diff options
Diffstat (limited to 'arch/arm/mach-omap1/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/mach-omap1/include/mach/debug-macro.S | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S index e8a8cf36b7f0..671408eb4ab4 100644 --- a/arch/arm/mach-omap1/include/mach/debug-macro.S +++ b/arch/arm/mach-omap1/include/mach/debug-macro.S | |||
@@ -33,7 +33,7 @@ omap_uart_virt: .word 0x0 | |||
33 | /* Use omap_uart_phys/virt if already configured */ | 33 | /* Use omap_uart_phys/virt if already configured */ |
34 | 9: mrc p15, 0, \rx, c1, c0 | 34 | 9: mrc p15, 0, \rx, c1, c0 |
35 | tst \rx, #1 @ MMU enabled? | 35 | tst \rx, #1 @ MMU enabled? |
36 | ldreq \rx, =omap_uart_phys @ physical base address | 36 | ldreq \rx, =__virt_to_phys(omap_uart_phys) @ physical base address |
37 | ldrne \rx, =omap_uart_virt @ virtual base | 37 | ldrne \rx, =omap_uart_virt @ virtual base |
38 | ldr \rx, [\rx, #0] | 38 | ldr \rx, [\rx, #0] |
39 | cmp \rx, #0 @ is port configured? | 39 | cmp \rx, #0 @ is port configured? |
@@ -68,11 +68,15 @@ omap_uart_virt: .word 0x0 | |||
68 | 68 | ||
69 | /* Store both phys and virt address for the uart */ | 69 | /* Store both phys and virt address for the uart */ |
70 | 98: add \rx, \rx, #0xff000000 @ phys base | 70 | 98: add \rx, \rx, #0xff000000 @ phys base |
71 | ldr \tmp, =omap_uart_phys | 71 | mrc p15, 0, \tmp, c1, c0 |
72 | tst \tmp, #1 @ MMU enabled? | ||
73 | ldreq \tmp, =__virt_to_phys(omap_uart_phys) | ||
74 | ldrne \tmp, =omap_uart_phys | ||
72 | str \rx, [\tmp, #0] | 75 | str \rx, [\tmp, #0] |
73 | sub \rx, \rx, #0xff000000 @ phys base | 76 | sub \rx, \rx, #0xff000000 @ phys base |
74 | add \rx, \rx, #0xfe000000 @ virt base | 77 | add \rx, \rx, #0xfe000000 @ virt base |
75 | ldr \tmp, =omap_uart_virt | 78 | ldreq \tmp, =__virt_to_phys(omap_uart_virt) |
79 | ldrne \tmp, =omap_uart_virt | ||
76 | str \rx, [\tmp, #0] | 80 | str \rx, [\tmp, #0] |
77 | b 9b | 81 | b 9b |
78 | 99: | 82 | 99: |