diff options
Diffstat (limited to 'arch/arm/plat-spear/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/plat-spear/include/mach/debug-macro.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-spear/include/mach/debug-macro.S b/arch/arm/plat-spear/include/mach/debug-macro.S new file mode 100644 index 000000000000..75b05ad0fbad --- /dev/null +++ b/arch/arm/plat-spear/include/mach/debug-macro.S | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header for spear platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar <viresh.linux@gmail.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/amba/serial.h> | ||
15 | #include <mach/spear.h> | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | mov \rp, #SPEAR_DBG_UART_BASE @ Physical base | ||
19 | mov \rv, #VA_SPEAR_DBG_UART_BASE @ Virtual base | ||
20 | .endm | ||
21 | |||
22 | .macro senduart, rd, rx | ||
23 | strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER | ||
24 | .endm | ||
25 | |||
26 | .macro waituart, rd, rx | ||
27 | 1001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
28 | tst \rd, #UART01x_FR_TXFF @ TX_FULL | ||
29 | bne 1001b | ||
30 | .endm | ||
31 | |||
32 | .macro busyuart, rd, rx | ||
33 | 1002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
34 | tst \rd, #UART011_FR_TXFE @ TX_EMPTY | ||
35 | beq 1002b | ||
36 | .endm | ||