]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
omap2/3: Fix DEBUG_LL for omap zoom2/3
authorTony Lindgren <tony@atomide.com>
Fri, 30 Apr 2010 19:57:14 +0000 (12:57 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 4 May 2010 00:53:08 +0000 (17:53 -0700)
Zoom2 and 3 have UARTs only on the external debug board.
GPMC needs to be mapped early to use it for DEBUG_LL.

Additionally, 0xfb000000 overlaps with other areas, so
use 0xfa400000 for the virtual address instead.

Note that with the pending serial.c patches you need to
set console=ttyS0,115200n8 as it will be the only UART
mapped. To use DEBUG_LL, you need to pass also earlyprintk
in cmdline.

Cc: Allen Pais <allen.pais@ti.com>
Acked-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-zoom-debugboard.c
arch/arm/mach-omap2/board-zoom2.c
arch/arm/mach-omap2/board-zoom3.c
arch/arm/mach-omap2/include/mach/debug-macro.S
arch/arm/mach-omap2/io.c
arch/arm/plat-omap/include/plat/serial.h

index e15d2e87cfc17570326a3711f37aba6c04946547..1d7f827b04082b02870ddccca909e7c21eb2baab 100644 (file)
@@ -82,7 +82,7 @@ static inline void __init zoom_init_smsc911x(void)
 
 static struct plat_serial8250_port serial_platform_data[] = {
        {
-               .mapbase        = 0x10000000,
+               .mapbase        = ZOOM_UART_BASE,
                .irq            = OMAP_GPIO_IRQ(102),
                .flags          = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
                .irqflags       = IRQF_SHARED | IRQF_TRIGGER_RISING,
index 9a26f84b11417f355586f4f45b19d1be5aae52d0..803ef14cbf2d64ca3218e56ce4e48572088fe67f 100644 (file)
@@ -91,8 +91,8 @@ static void __init omap_zoom2_map_io(void)
 }
 
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
-       .phys_io        = 0x48000000,
-       .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
+       .phys_io        = ZOOM_UART_BASE,
+       .io_pg_offst    = (ZOOM_UART_VIRT >> 18) & 0xfffc,
        .boot_params    = 0x80000100,
        .map_io         = omap_zoom2_map_io,
        .init_irq       = omap_zoom2_init_irq,
index cd3e40cf3ac1f5df07576963ddf150593886477d..33147042485f5f505c7a0906f2b0d94e02a9f460 100644 (file)
@@ -73,8 +73,8 @@ static void __init omap_zoom_init(void)
 }
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
-       .phys_io        = 0x48000000,
-       .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
+       .phys_io        = ZOOM_UART_BASE,
+       .io_pg_offst    = (ZOOM_UART_VIRT >> 18) & 0xfffc,
        .boot_params    = 0x80000100,
        .map_io         = omap_zoom_map_io,
        .init_irq       = omap_zoom_init_irq,
index 4976169d9f36c19da4cc2089b4dbc5371c4abe32..35b24409a0c827a85e3c4e821f7c966d2602462e 100644 (file)
@@ -88,10 +88,10 @@ omap_uart_lsr:      .word   0
                b       98f
 44:            mov     \rx, #UART_OFFSET(OMAP4_UART4_BASE)
                b       98f
-95:            mov     \rx, #ZOOM_UART_BASE
+95:            ldr     \rx, =ZOOM_UART_BASE
                ldr     \tmp, =omap_uart_phys
                str     \rx, [\tmp, #0]
-               mov     \rx, #ZOOM_UART_VIRT
+               ldr     \rx, =ZOOM_UART_VIRT
                ldr     \tmp, =omap_uart_virt
                str     \rx, [\tmp, #0]
                mov     \rx, #(UART_LSR << ZOOM_PORT_SHIFT)
index 87f676acf61d6e911a727a90791e0e188602302f..3cfb425ea67e86585f66e1595b29e2c28b4d31ea 100644 (file)
@@ -166,6 +166,15 @@ static struct map_desc omap34xx_io_desc[] __initdata = {
                .length         = L4_EMU_34XX_SIZE,
                .type           = MT_DEVICE
        },
+#if defined(CONFIG_DEBUG_LL) &&                                                        \
+       (defined(CONFIG_MACH_OMAP_ZOOM2) || defined(CONFIG_MACH_OMAP_ZOOM3))
+       {
+               .virtual        = ZOOM_UART_VIRT,
+               .pfn            = __phys_to_pfn(ZOOM_UART_BASE),
+               .length         = SZ_1M,
+               .type           = MT_DEVICE
+       },
+#endif
 };
 #endif
 #ifdef CONFIG_ARCH_OMAP4
index 42a6318dd305367a574c139c67152acb4f5d011b..19145f5c32ba7a73060624c8c6926f294d7ee9b8 100644 (file)
@@ -53,7 +53,7 @@
 
 /* External port on Zoom2/3 */
 #define ZOOM_UART_BASE         0x10000000
-#define ZOOM_UART_VIRT         0xfb000000
+#define ZOOM_UART_VIRT         0xfa400000
 
 #define OMAP_PORT_SHIFT                2
 #define OMAP7XX_PORT_SHIFT     0