diff options
Diffstat (limited to 'arch/arm/mach-omap2/include')
-rw-r--r-- | arch/arm/mach-omap2/include/mach/debug-macro.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S index 4a63a2ea484d..35b24409a0c8 100644 --- a/arch/arm/mach-omap2/include/mach/debug-macro.S +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <linux/serial_reg.h> | 14 | #include <linux/serial_reg.h> |
15 | 15 | ||
16 | #include <asm/memory.h> | ||
17 | |||
16 | #include <plat/serial.h> | 18 | #include <plat/serial.h> |
17 | 19 | ||
18 | #define UART_OFFSET(addr) ((addr) & 0x00ffffff) | 20 | #define UART_OFFSET(addr) ((addr) & 0x00ffffff) |
@@ -40,13 +42,12 @@ omap_uart_lsr: .word 0 | |||
40 | cmp \rx, #0 @ is port configured? | 42 | cmp \rx, #0 @ is port configured? |
41 | bne 99f @ already configured | 43 | bne 99f @ already configured |
42 | 44 | ||
43 | /* Check UART1 scratchpad register for uart to use */ | 45 | /* Check the debug UART configuration set in uncompress.h */ |
44 | mrc p15, 0, \rx, c1, c0 | 46 | mrc p15, 0, \rx, c1, c0 |
45 | tst \rx, #1 @ MMU enabled? | 47 | tst \rx, #1 @ MMU enabled? |
46 | moveq \rx, #0x48000000 @ physical base address | 48 | ldreq \rx, =OMAP_UART_INFO |
47 | movne \rx, #0xfa000000 @ virtual base | 49 | ldrne \rx, =__phys_to_virt(OMAP_UART_INFO) |
48 | orr \rx, \rx, #0x0006a000 @ uart1 on omap2/3/4 | 50 | ldr \rx, [\rx, #0] |
49 | ldrb \rx, [\rx, #(UART_SCR << OMAP_PORT_SHIFT)] @ scratchpad | ||
50 | 51 | ||
51 | /* Select the UART to use based on the UART1 scratchpad value */ | 52 | /* Select the UART to use based on the UART1 scratchpad value */ |
52 | cmp \rx, #0 @ no port configured? | 53 | cmp \rx, #0 @ no port configured? |
@@ -87,10 +88,10 @@ omap_uart_lsr: .word 0 | |||
87 | b 98f | 88 | b 98f |
88 | 44: mov \rx, #UART_OFFSET(OMAP4_UART4_BASE) | 89 | 44: mov \rx, #UART_OFFSET(OMAP4_UART4_BASE) |
89 | b 98f | 90 | b 98f |
90 | 95: mov \rx, #ZOOM_UART_BASE | 91 | 95: ldr \rx, =ZOOM_UART_BASE |
91 | ldr \tmp, =omap_uart_phys | 92 | ldr \tmp, =omap_uart_phys |
92 | str \rx, [\tmp, #0] | 93 | str \rx, [\tmp, #0] |
93 | mov \rx, #ZOOM_UART_VIRT | 94 | ldr \rx, =ZOOM_UART_VIRT |
94 | ldr \tmp, =omap_uart_virt | 95 | ldr \tmp, =omap_uart_virt |
95 | str \rx, [\tmp, #0] | 96 | str \rx, [\tmp, #0] |
96 | mov \rx, #(UART_LSR << ZOOM_PORT_SHIFT) | 97 | mov \rx, #(UART_LSR << ZOOM_PORT_SHIFT) |