Merge branch 'linus' into release
[pandora-kernel.git] / arch / arm / mach-omap1 / include / mach / debug-macro.S
index e8a8cf3..671408e 100644 (file)
@@ -33,7 +33,7 @@ omap_uart_virt:       .word   0x0
                /* Use omap_uart_phys/virt if already configured */
 9:             mrc     p15, 0, \rx, c1, c0
                tst     \rx, #1                 @ MMU enabled?
-               ldreq   \rx, =omap_uart_phys    @ physical base address
+               ldreq   \rx, =__virt_to_phys(omap_uart_phys)    @ physical base address
                ldrne   \rx, =omap_uart_virt    @ virtual base
                ldr     \rx, [\rx, #0]
                cmp     \rx, #0                 @ is port configured?
@@ -68,11 +68,15 @@ omap_uart_virt:     .word   0x0
 
                /* Store both phys and virt address for the uart */
 98:            add     \rx, \rx, #0xff000000   @ phys base
-               ldr     \tmp, =omap_uart_phys
+               mrc     p15, 0, \tmp, c1, c0
+               tst     \tmp, #1                @ MMU enabled?
+               ldreq   \tmp, =__virt_to_phys(omap_uart_phys)
+               ldrne   \tmp, =omap_uart_phys
                str     \rx, [\tmp, #0]
                sub     \rx, \rx, #0xff000000   @ phys base
                add     \rx, \rx, #0xfe000000   @ virt base
-               ldr     \tmp, =omap_uart_virt
+               ldreq   \tmp, =__virt_to_phys(omap_uart_virt)
+               ldrne   \tmp, =omap_uart_virt
                str     \rx, [\tmp, #0]
                b       9b
 99: