2 * arch/arm/mach-prima2/include/mach/debug-macro.S
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
6 * Licensed under GPLv2 or later.
9 #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
10 #define SIRFSOC_UART1_PA_BASE 0xb0060000
11 #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
12 #define SIRFSOC_UART1_PA_BASE 0xcc060000
14 #define SIRFSOC_UART1_PA_BASE 0
17 #define SIRFSOC_UART1_VA_BASE 0xFEC60000
19 #define SIRFSOC_UART_TXFIFO_STATUS 0x0114
20 #define SIRFSOC_UART_TXFIFO_DATA 0x0118
22 #define SIRFSOC_UART1_TXFIFO_FULL (1 << 5)
23 #define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6)
25 .macro addruart, rp, rv, tmp
26 ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical
27 ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual
31 str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
38 1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
39 tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY