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>

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

index 81129d1..445a545 100644 (file)
@@ -321,6 +321,7 @@ static struct uart_clk_parent uart_parent_clk[] = {
 };
 
 static struct tegra_uart_platform_data cardhu_uart_pdata;
+static struct tegra_uart_platform_data cardhu_loopback_uart_pdata;
 
 static void __init uart_debug_init(void)
 {
@@ -418,11 +419,16 @@ static void __init cardhu_uart_init(void)
        }
        cardhu_uart_pdata.parent_clk_list = uart_parent_clk;
        cardhu_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
+       cardhu_loopback_uart_pdata.parent_clk_list = uart_parent_clk;
+       cardhu_loopback_uart_pdata.parent_clk_count =
+                                               ARRAY_SIZE(uart_parent_clk);
+       cardhu_loopback_uart_pdata.is_loopback = true;
        tegra_uarta_device.dev.platform_data = &cardhu_uart_pdata;
        tegra_uartb_device.dev.platform_data = &cardhu_uart_pdata;
        tegra_uartc_device.dev.platform_data = &cardhu_uart_pdata;
        tegra_uartd_device.dev.platform_data = &cardhu_uart_pdata;
-       tegra_uarte_device.dev.platform_data = &cardhu_uart_pdata;
+       /* UARTE is used for loopback test purpose */
+       tegra_uarte_device.dev.platform_data = &cardhu_loopback_uart_pdata;
 
        /* Register low speed only if it is selected */
        if (!is_tegra_debug_uartport_hs()) {
index dcfbf70..489c1cd 100644 (file)
@@ -388,6 +388,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)
 {
@@ -438,11 +439,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())