arm: tegra: whistler: select uart debug address
Shridhar Rasal [Wed, 7 Mar 2012 10:11:11 +0000 (15:11 +0530)]
Added mechanism to select the uart debug channel base address through
variable so that board file can directly change this.

bug 907612

Reviewed-on: http://git-master/r/34494

Change-Id: I9f9dbeaf81d5b62708d01fddd6e27223dc2dd361
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/88279
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/board-whistler.c

index f38bb2d..47c3cd5 100644 (file)
@@ -136,6 +136,8 @@ static void __init uart_debug_init(void)
                /* UARTB is the debug port. */
                pr_info("Selecting UARTB as the debug console\n");
                whistler_uart_devices[1] = &debug_uartb;
+               debug_uart_port_base = ((struct plat_serial8250_port *)(
+                       debug_uartb_device.dev.platform_data))->mapbase;
                debug_uart_clk = clk_get_sys("serial8250.0", "uartb");
 
                /* Clock enable for the debug channel */
@@ -159,6 +161,8 @@ static void __init uart_debug_init(void)
                /* UARTA is the debug port. */
                pr_info("Selecting UARTA as the debug console\n");
                whistler_uart_devices[0] = &debug_uarta;
+               debug_uart_port_base = ((struct plat_serial8250_port *)(
+                       debug_uarta_device.dev.platform_data))->mapbase;
                debug_uart_clk = clk_get_sys("serial8250.0", "uarta");
 
                /* Clock enable for the debug channel */