ARM: tegra: register pinmux and gpio devices before pinmux init
Varun Wadekar [Wed, 28 Mar 2012 08:28:12 +0000 (13:28 +0530)]
Change-Id: I93ece369cbe927d3a7f34824533cf43420ec3296
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/board-aruba.c
arch/arm/mach-tegra/board-cardhu-pinmux.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-enterprise-pinmux.c
arch/arm/mach-tegra/board-enterprise.c
arch/arm/mach-tegra/board-kai.c
arch/arm/mach-tegra/board-p1852.c
arch/arm/mach-tegra/board-ventana.c
arch/arm/mach-tegra/board-whistler.c

index 152f347..c7de662 100644 (file)
@@ -507,6 +507,7 @@ static void aruba_sata_init(void) { }
 static void __init tegra_aruba_init(void)
 {
        tegra_clk_init_from_table(aruba_clk_init_table);
+       tegra_enable_pinmux();
        aruba_pinmux_init();
 
        platform_add_devices(aruba_devices, ARRAY_SIZE(aruba_devices));
index 33dac48..4ece2f0 100644 (file)
@@ -624,17 +624,10 @@ static void __init cardhu_gpio_init_configure(void)
        }
 }
 
-static struct platform_device *pinmux_devices[] = {
-       &tegra_gpio_device,
-       &tegra_pinmux_device,
-};
-
 int __init cardhu_pinmux_init(void)
 {
        struct board_info board_info;
 
-       platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
-
        tegra30_default_pinmux();
 
        cardhu_gpio_init_configure();
index d9e4a7d..c1527a5 100644 (file)
@@ -1121,6 +1121,7 @@ static void __init tegra_cardhu_init(void)
 {
        tegra_thermal_init(&thermal_data);
        tegra_clk_init_from_table(cardhu_clk_init_table);
+       tegra_enable_pinmux();
        cardhu_pinmux_init();
        cardhu_i2c_init();
        cardhu_spi_init();
index f1d3448..7abe9ca 100644 (file)
@@ -531,15 +531,8 @@ static void enterprise_set_unused_pin_gpio(struct pin_info_low_power_mode *lpm_p
        }
 }
 
-static struct platform_device *pinmux_devices[] = {
-       &tegra_gpio_device,
-       &tegra_pinmux_device,
-};
-
 int __init enterprise_pinmux_init(void)
 {
-       platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
-
        tegra30_default_pinmux();
 
        tegra_pinmux_config_table(enterprise_pinmux, ARRAY_SIZE(enterprise_pinmux));
index 75ac9be..3e8413f 100644 (file)
@@ -927,6 +927,7 @@ static void __init tegra_enterprise_init(void)
 {
        tegra_thermal_init(&thermal_data);
        tegra_clk_init_from_table(enterprise_clk_init_table);
+       tegra_enable_pinmux();
        enterprise_pinmux_init();
        enterprise_i2c_init();
        enterprise_uart_init();
index 9819f13..2048015 100644 (file)
@@ -800,6 +800,7 @@ static void __init tegra_kai_init(void)
 {
        tegra_thermal_init(&thermal_data);
        tegra_clk_init_from_table(kai_clk_init_table);
+       tegra_enable_pinmux();
        kai_pinmux_init();
        kai_i2c_init();
        kai_spi_init();
index c9b4811..15c7d57 100644 (file)
@@ -420,6 +420,7 @@ static void __init tegra_p1852_init(void)
 {
        tegra_init_board_info();
        tegra_clk_init_from_table(p1852_clk_init_table);
+       tegra_enable_pinmux();
        p1852_pinmux_init();
        p1852_i2c_init();
        p1852_i2s_audio_init();
index a6323d2..3f4ea61 100644 (file)
@@ -576,6 +576,7 @@ static void __init tegra_ventana_init(void)
        struct board_info BoardInfo;
 
        tegra_clk_init_from_table(ventana_clk_init_table);
+       tegra_enable_pinmux();
        ventana_pinmux_init();
        ventana_i2c_init();
        ventana_uart_init();
index d19af01..c7d9eb4 100644 (file)
@@ -518,6 +518,7 @@ static void __init tegra_whistler_init(void)
 {
        int modem_id = tegra_get_modem_id();
        tegra_clk_init_from_table(whistler_clk_init_table);
+       tegra_enable_pinmux();
        whistler_pinmux_init();
        whistler_i2c_init();
        whistler_uart_init();