]> git.hungrycats.org Git - linux/commitdiff
[ARM PATCH] 1853/1: Update OMAP low level debug functions
authorTony Lindgren <tony@com.rmk.(none)>
Thu, 13 May 2004 13:19:05 +0000 (14:19 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 13 May 2004 13:19:05 +0000 (14:19 +0100)
Patch from Tony Lindgren

Changes OMAP low level debug function to allow virtual IO != physical
IO.  Also removes waituart checking, as it only worked for first
serial port.

arch/arm/kernel/debug.S

index 9c0acea28224717d1e959d0bcdac681f69d963f4..eacb85cea97f32a58d2def11b2a7476f328ff21f 100644 (file)
 
 #include <asm/arch/serial.h>
 
+#ifdef CONFIG_ARCH_OMAP730
+#define OMAP_SERIAL_REG_SHIFT  0
+#else
+#define OMAP_SERIAL_REG_SHIFT  2
+#endif
+               /* See also __create_page_tables in head.S */
                .macro  addruart,rx
-               mov     \rx, #0xff000000
+               mrc     p15, 0, \rx, c1, c0
+               tst     \rx, #1                 @ MMU enabled?
+               moveq   \rx, #0xff000000        @ physical base address
+               movne   \rx, #0xfe000000        @ virtual base
                orr     \rx, \rx, #0x00fb0000
+#ifdef CONFIG_OMAP_LL_DEBUG_UART3
+               orr     \rx, \rx, #0x00009000   @ UART 3
+#endif
+#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
+               orr     \rx, \rx, #0x00000800   @ UART 2 & 3
+#endif
                .endm
 
                .macro  senduart,rd,rx
                .endm
 
                .macro  waituart,rd,rx
-1001:          ldrb    \rd, [\rx, #(0x6 << OMAP_SERIAL_REG_SHIFT)]
-               tst     \rd, #0x10
-               beq     1001b
                .endm
 
 #elif defined(CONFIG_ARCH_S3C2410)