diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-ux500/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/debug-macro.S | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 699588f7da87..8ad5ee8107ae 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -27,4 +27,11 @@ config MACH_U8500_MOP | |||
27 | on early drop silicon version of 8500. | 27 | on early drop silicon version of 8500. |
28 | endmenu | 28 | endmenu |
29 | 29 | ||
30 | config UX500_DEBUG_UART | ||
31 | int "Ux500 UART to use for low-level debug" | ||
32 | default 2 | ||
33 | help | ||
34 | Choose the UART on which kernel low-level debug messages should be | ||
35 | output. | ||
36 | |||
30 | endif | 37 | endif |
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S index 09cbfda8aee5..c5203b7ea552 100644 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ b/arch/arm/mach-ux500/include/mach/debug-macro.S | |||
@@ -10,11 +10,19 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
12 | 12 | ||
13 | #if CONFIG_UX500_DEBUG_UART > 2 | ||
14 | #error Invalid Ux500 debug UART | ||
15 | #endif | ||
16 | |||
17 | #define __UX500_UART(n) UX500_UART##n##_BASE | ||
18 | #define UX500_UART(n) __UX500_UART(n) | ||
19 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) | ||
20 | |||
13 | .macro addruart, rx, tmp | 21 | .macro addruart, rx, tmp |
14 | mrc p15, 0, \rx, c1, c0 | 22 | mrc p15, 0, \rx, c1, c0 |
15 | tst \rx, #1 @ MMU enabled? | 23 | tst \rx, #1 @ MMU enabled? |
16 | ldreq \rx, =U8500_UART2_BASE @ no, physical address | 24 | ldreq \rx, =UART_BASE @ no, physical address |
17 | ldrne \rx, =IO_ADDRESS(U8500_UART2_BASE) @ yes, virtual address | 25 | ldrne \rx, =IO_ADDRESS(UART_BASE) @ yes, virtual address |
18 | .endm | 26 | .endm |
19 | 27 | ||
20 | #include <asm/hardware/debug-pl01x.S> | 28 | #include <asm/hardware/debug-pl01x.S> |