diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2012-03-07 18:11:11 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-03-09 11:47:25 -0800 |
commit | 53efc506af60072bd71ff2687c9aa7e9ffbfcc2f (patch) | |
tree | 6daf4180cfec387c7eec383ecbb66d978104a0bf | |
parent | 81f8de14cc494f665d380e4f7f74803b42cfc9e8 (diff) |
arm: tegra: whistler: remove duplicate code
Remove duplication definition of uarta and uartb console
bug 907612
Change-Id: I0f0f4d990b1d7050b0ab044f5c9059b7972497b5
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/88325
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-whistler.c | 56 |
1 files changed, 6 insertions, 50 deletions
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c index 47c3cd53cf36..2ff6e55e1621 100644 --- a/arch/arm/mach-tegra/board-whistler.c +++ b/arch/arm/mach-tegra/board-whistler.c @@ -65,52 +65,6 @@ #define SZ_152M (SZ_128M + SZ_16M + SZ_8M) #define USB1_VBUS_GPIO TCA6416_GPIO_BASE -static struct plat_serial8250_port debug_uartb_platform_data[] = { - { - .membase = IO_ADDRESS(TEGRA_UARTB_BASE), - .mapbase = TEGRA_UARTB_BASE, - .irq = INT_UARTB, - .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, - .type = PORT_TEGRA, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = 216000000, - }, { - .flags = 0, - } -}; - -static struct platform_device debug_uartb = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = debug_uartb_platform_data, - }, -}; - -static struct plat_serial8250_port debug_uarta_platform_data[] = { - { - .membase = IO_ADDRESS(TEGRA_UARTA_BASE), - .mapbase = TEGRA_UARTA_BASE, - .irq = INT_UARTA, - .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, - .type = PORT_TEGRA, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = 216000000, - }, { - .flags = 0, - } -}; - -static struct platform_device debug_uarta = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = debug_uarta_platform_data, - }, -}; - static struct platform_device *whistler_uart_devices[] __initdata = { &tegra_uarta_device, &tegra_uartb_device, @@ -135,14 +89,15 @@ static void __init uart_debug_init(void) if (modem_id == 0x1) { /* UARTB is the debug port. */ pr_info("Selecting UARTB as the debug console\n"); - whistler_uart_devices[1] = &debug_uartb; + whistler_uart_devices[1] = &debug_uartb_device; 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 */ if (!IS_ERR_OR_NULL(debug_uart_clk)) { - rate = debug_uartb_platform_data[0].uartclk; + rate = ((struct plat_serial8250_port *)( + debug_uartb_device.dev.platform_data))->uartclk; pr_info("The debug console clock name is %s\n", debug_uart_clk->name); c = tegra_get_clock_by_name("pll_p"); @@ -160,14 +115,15 @@ static void __init uart_debug_init(void) } else { /* UARTA is the debug port. */ pr_info("Selecting UARTA as the debug console\n"); - whistler_uart_devices[0] = &debug_uarta; + whistler_uart_devices[0] = &debug_uarta_device; 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 */ if (!IS_ERR_OR_NULL(debug_uart_clk)) { - rate = debug_uarta_platform_data[0].uartclk; + rate = ((struct plat_serial8250_port *)( + debug_uarta_device.dev.platform_data))->uartclk; pr_info("The debug console clock name is %s\n", debug_uart_clk->name); c = tegra_get_clock_by_name("pll_p"); |