arm: Fix DEBUG_LL for omap zoom2/3
Subsystems (3)
Tony Lindgren
maintainerPATCH 1/1 arm: Fix DEBUG_LL for omap zoom2/3
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 <[email protected]>
Cc Vikram Pandita <[email protected]>
Signed-off-by Tony Lindgren <[email protected]>
arch/arm/kernel/head.S +10 -0
@@ -328,6 +328,16 @@ __create_page_tables: add r0, r4, #0xd8000000 >> 18 str r3, [r0] #endif +#if defined(CONFIG_MACH_OMAP_ZOOM2) || defined(CONFIG_MACH_OMAP_ZOOM3) + /* + * Zoom2 and Zoom3 have UARTs only on the debug board. + * The debug board is connected to the GPMC. + */ + add r0, r4, #0xfa000000 >> 18 + orr r0, r0, #0x00400000 >> 18 @ ZOOM_UART_VIRT + orr r3, r7, #0x10000000 @ ZOOM_UART_BASE + str r3, [r0] +#endif #endif mov pc, lr ENDPROC(__create_page_tables)
arch/arm/mach-omap2/board-zoom-debugboard.c +1 -1
@@ -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 ,
arch/arm/mach-omap2/include/mach/debug-macro.S +2 -2
@@ -87,10 +87,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)
arch/arm/mach-omap2/io.c +9 -0
@@ -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
arch/arm/plat-omap/include/plat/serial.h +1 -1
@@ -39,7 +39,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
--6Nae48J/T25AfBN4--