Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 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 | #include <mach/hardware.h> |
| 10 | #include <mach/uart.h> |
| 11 | |
Nicolas Pitre | 639da5e | 2011-08-31 22:55:46 -0400 | [diff] [blame] | 12 | .macro addruart, rp, rv, tmp |
Binghua Duan | 02c981c | 2011-07-08 17:40:12 +0800 | [diff] [blame] | 13 | ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical |
| 14 | ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual |
| 15 | .endm |
| 16 | |
| 17 | .macro senduart,rd,rx |
| 18 | str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] |
| 19 | .endm |
| 20 | |
| 21 | .macro busyuart,rd,rx |
| 22 | .endm |
| 23 | |
| 24 | .macro waituart,rd,rx |
| 25 | 1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] |
| 26 | tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY |
| 27 | beq 1001b |
| 28 | .endm |
| 29 | |