• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * arch/arm/mach-prima2/include/mach/debug-macro.S
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#define SIRF_LLUART_TXFIFO_STATUS	0x0114
10#define SIRF_LLUART_TXFIFO_DATA	0x0118
11
12#define SIRF_LLUART_TXFIFO_FULL                       (1 << 5)
13
14#ifdef CONFIG_DEBUG_SIRFATLAS7_UART0
15#define SIRF_LLUART_TXFIFO_EMPTY			(1 << 8)
16#else
17#define SIRF_LLUART_TXFIFO_EMPTY			(1 << 6)
18#endif
19
20
21	.macro	addruart, rp, rv, tmp
22	ldr	\rp, =CONFIG_DEBUG_UART_PHYS		@ physical
23	ldr	\rv, =CONFIG_DEBUG_UART_VIRT		@ virtual
24	.endm
25
26	.macro	senduart,rd,rx
27	str	\rd, [\rx, #SIRF_LLUART_TXFIFO_DATA]
28	.endm
29
30	.macro	busyuart,rd,rx
31	.endm
32
33	.macro	waituart,rd,rx
341001:	ldr	\rd, [\rx, #SIRF_LLUART_TXFIFO_STATUS]
35	tst	\rd, #SIRF_LLUART_TXFIFO_EMPTY
36	beq	1001b
37	.endm
38
39