ARM: tegra: uarte: Enable loopback
Pradeep Goudagunta [Wed, 4 Jan 2012 11:28:03 +0000 (16:28 +0530)]
Enable uarte as loopback interface for Cardhu and Enterprise boards.

Bug 845036
Bug 921090

Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>

Change-Id: Ib27a9dadeefec11fdf5a31ecd887eb2d788350d0
Reviewed-on: http://git-master/r/73178
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>

Rebase-Id: R41594186fd19ee5cb155527db795a212bea5c778

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

index dcdd18f..d77e16c 100644 (file)
@@ -414,6 +414,7 @@ static struct uart_clk_parent uart_parent_clk[] = {
 #endif
 };
 static struct tegra_uart_platform_data enterprise_uart_pdata;
+static struct tegra_uart_platform_data enterprise_loopback_uart_pdata;
 
 static void __init uart_debug_init(void)
 {
@@ -464,11 +465,16 @@ static void __init enterprise_uart_init(void)
        }
        enterprise_uart_pdata.parent_clk_list = uart_parent_clk;
        enterprise_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
+       enterprise_loopback_uart_pdata.parent_clk_list = uart_parent_clk;
+       enterprise_loopback_uart_pdata.parent_clk_count =
+                                               ARRAY_SIZE(uart_parent_clk);
+       enterprise_loopback_uart_pdata.is_loopback = true;
        tegra_uarta_device.dev.platform_data = &enterprise_uart_pdata;
        tegra_uartb_device.dev.platform_data = &enterprise_uart_pdata;
        tegra_uartc_device.dev.platform_data = &enterprise_uart_pdata;
        tegra_uartd_device.dev.platform_data = &enterprise_uart_pdata;
-       tegra_uarte_device.dev.platform_data = &enterprise_uart_pdata;
+       /* UARTE is used for loopback test purpose */
+       tegra_uarte_device.dev.platform_data = &enterprise_loopback_uart_pdata;
 
        /* Register low speed only if it is selected */
        if (!is_tegra_debug_uartport_hs())