1
2
3
4
5
6
7
8 #define SIRF_LLUART_TXFIFO_STATUS 0x0114
9 #define SIRF_LLUART_TXFIFO_DATA 0x0118
10
11 #define SIRF_LLUART_TXFIFO_FULL (1 << 5)
12
13 #ifdef CONFIG_DEBUG_SIRFATLAS7_UART0
14 #define SIRF_LLUART_TXFIFO_EMPTY (1 << 8)
15 #else
16 #define SIRF_LLUART_TXFIFO_EMPTY (1 << 6)
17 #endif
18
19
20 .macro addruart, rp, rv, tmp
21 ldr \rp, =CONFIG_DEBUG_UART_PHYS @ physical
22 ldr \rv, =CONFIG_DEBUG_UART_VIRT @ virtual
23 .endm
24
25 .macro senduart,rd,rx
26 str \rd, [\rx, #SIRF_LLUART_TXFIFO_DATA]
27 .endm
28
29 .macro busyuart,rd,rx
30 .endm
31
32 .macro waituart,rd,rx
33 1001: ldr \rd, [\rx, #SIRF_LLUART_TXFIFO_STATUS]
34 tst \rd, #SIRF_LLUART_TXFIFO_EMPTY
35 beq 1001b
36 .endm
37