diff options
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/debug-macro.S | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S index 55a39564b43c..8ea3bffb4e00 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/mach-tegra/include/mach/debug-macro.S | |||
@@ -20,24 +20,28 @@ | |||
20 | 20 | ||
21 | #include <mach/io.h> | 21 | #include <mach/io.h> |
22 | 22 | ||
23 | .macro addruart,rx, tmp | 23 | .macro addruart, rp, rv |
24 | mrc p15, 0, \rx, c1, c0 | 24 | ldreq \rp, =IO_APB_PHYS @ physical |
25 | tst \rx, #1 @ MMU enabled? | 25 | ldrne \rv, =IO_APB_VIRT @ virtual |
26 | ldreq \rx, =IO_APB_PHYS @ physical | ||
27 | ldrne \rx, =IO_APB_VIRT @ virtual | ||
28 | #if defined(CONFIG_TEGRA_DEBUG_UART_NONE) | 26 | #if defined(CONFIG_TEGRA_DEBUG_UART_NONE) |
29 | #error "A debug UART must be selected in the kernel config to use DEBUG_LL" | 27 | #error "A debug UART must be selected in the kernel config to use DEBUG_LL" |
30 | #elif defined(CONFIG_TEGRA_DEBUG_UARTA) | 28 | #elif defined(CONFIG_TEGRA_DEBUG_UARTA) |
31 | orr \rx, \rx, #0x6000 | 29 | orr \rp, \rp, #0x6000 |
30 | orr \rv, \rv, #0x6000 | ||
32 | #elif defined(CONFIG_TEGRA_DEBUG_UARTB) | 31 | #elif defined(CONFIG_TEGRA_DEBUG_UARTB) |
33 | ldr \tmp, =0x6040 | 32 | orr \rp, \rp, #0x6000 |
34 | orr \rx, \rx, \tmp | 33 | orr \rp, \rp, #0x40 |
34 | orr \rv, \rv, #0x6000 | ||
35 | orr \rv, \rv, #0x40 | ||
35 | #elif defined(CONFIG_TEGRA_DEBUG_UARTC) | 36 | #elif defined(CONFIG_TEGRA_DEBUG_UARTC) |
36 | orr \rx, \rx, #0x6200 | 37 | orr \rp, \rp, #0x6200 |
38 | orr \rv, \rv, #0x6200 | ||
37 | #elif defined(CONFIG_TEGRA_DEBUG_UARTD) | 39 | #elif defined(CONFIG_TEGRA_DEBUG_UARTD) |
38 | orr \rx, \rx, #0x6300 | 40 | orr \rp, \rp, #0x6300 |
41 | orr \rv, \rv, #0x6300 | ||
39 | #elif defined(CONFIG_TEGRA_DEBUG_UARTE) | 42 | #elif defined(CONFIG_TEGRA_DEBUG_UARTE) |
40 | orr \rx, \rx, #0x6400 | 43 | orr \rp, \rp, #0x6400 |
44 | orr \rv, \rv, #0x6400 | ||
41 | #endif | 45 | #endif |
42 | .endm | 46 | .endm |
43 | 47 | ||