diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2015-01-09 12:34:03 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-01-21 10:49:40 -0500 |
commit | 4d31e66412955b20081d6966c271a71d4abcefd7 (patch) | |
tree | f8cf99b71d85fe9e21a5ab1452996d9e908ef078 /arch/arm/include/debug | |
parent | c26b999353339c235b9e166739926d0199eeecbf (diff) |
ARM: 8272/1: netx: Migrate DEBUG_LL macros to shared directory
As part of the migration we introduce DEBUG_UART_PHYS/DEBUG_UART_VIRT
which default to UART1 but allow a user to configure UART2 or UART3.
We also introduce symbolic names for the registers and flags.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Arnd Bergmann <arnd.bergmann@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/debug')
-rw-r--r-- | arch/arm/include/debug/netx.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/include/debug/netx.S b/arch/arm/include/debug/netx.S new file mode 100644 index 000000000000..81e1b2af70f7 --- /dev/null +++ b/arch/arm/include/debug/netx.S | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #define UART_DATA 0 | ||
14 | #define UART_FLAG 0x18 | ||
15 | #define UART_FLAG_BUSY (1 << 3) | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
19 | ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
20 | .endm | ||
21 | |||
22 | .macro senduart,rd,rx | ||
23 | str \rd, [\rx, #UART_DATA] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_FLAG] | ||
28 | tst \rd, #UART_FLAG_BUSY | ||
29 | bne 1002b | ||
30 | .endm | ||
31 | |||
32 | .macro waituart,rd,rx | ||
33 | 1001: ldr \rd, [\rx, #UART_FLAG] | ||
34 | tst \rd, #UART_FLAG_BUSY | ||
35 | bne 1001b | ||
36 | .endm | ||