ARM: tegra: create defines for SD-related GPIO names
authorStephen Warren <swarren@nvidia.com>
Sat, 5 Mar 2011 05:44:28 +0000 (22:44 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 7 Mar 2011 23:34:25 +0000 (15:34 -0800)
This ensures they're kept in sync between platform_data definitions and
the GPIO table initialization.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-tegra/board-harmony-pinmux.c
arch/arm/mach-tegra/board-harmony.c
arch/arm/mach-tegra/board-harmony.h
arch/arm/mach-tegra/board-seaboard-pinmux.c
arch/arm/mach-tegra/board-seaboard.c
arch/arm/mach-tegra/board-seaboard.h

index 98368d947be3145a6f31a1dbef2cb53bf2f80975..3ada474fbafbb39e56d676d6443bc3c95f2eb80d 100644 (file)
@@ -141,12 +141,12 @@ static struct tegra_pingroup_config harmony_pinmux[] = {
 };
 
 static struct tegra_gpio_table gpio_table[] = {
-       { .gpio = TEGRA_GPIO_PI5,       .enable = true  }, /* mmc2 cd   */
-       { .gpio = TEGRA_GPIO_PH1,       .enable = true  }, /* mmc2 wp   */
-       { .gpio = TEGRA_GPIO_PT3,       .enable = true  }, /* mmc2 pwr  */
-       { .gpio = TEGRA_GPIO_PH2,       .enable = true  }, /* mmc4 cd   */
-       { .gpio = TEGRA_GPIO_PH3,       .enable = true  }, /* mmc4 wp   */
-       { .gpio = TEGRA_GPIO_PI6,       .enable = true  }, /* mmc4 pwr  */
+       { .gpio = TEGRA_GPIO_SD2_CD,            .enable = true  },
+       { .gpio = TEGRA_GPIO_SD2_WP,            .enable = true  },
+       { .gpio = TEGRA_GPIO_SD2_POWER,         .enable = true  },
+       { .gpio = TEGRA_GPIO_SD4_CD,            .enable = true  },
+       { .gpio = TEGRA_GPIO_SD4_WP,            .enable = true  },
+       { .gpio = TEGRA_GPIO_SD4_POWER,         .enable = true  },
 };
 
 void harmony_pinmux_init(void)
index 49224e936eb48464bf05f1af2077db0bfbf89c10..2c4a234f8acb8bafe2e3a1a20ea3392c511e7ac3 100644 (file)
@@ -91,15 +91,15 @@ static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 };
 
 static struct tegra_sdhci_platform_data sdhci_pdata2 = {
-       .cd_gpio        = TEGRA_GPIO_PI5,
-       .wp_gpio        = TEGRA_GPIO_PH1,
-       .power_gpio     = TEGRA_GPIO_PT3,
+       .cd_gpio        = TEGRA_GPIO_SD2_CD,
+       .wp_gpio        = TEGRA_GPIO_SD2_WP,
+       .power_gpio     = TEGRA_GPIO_SD2_POWER,
 };
 
 static struct tegra_sdhci_platform_data sdhci_pdata4 = {
-       .cd_gpio        = TEGRA_GPIO_PH2,
-       .wp_gpio        = TEGRA_GPIO_PH3,
-       .power_gpio     = TEGRA_GPIO_PI6,
+       .cd_gpio        = TEGRA_GPIO_SD4_CD,
+       .wp_gpio        = TEGRA_GPIO_SD4_WP,
+       .power_gpio     = TEGRA_GPIO_SD4_POWER,
        .is_8bit        = 1,
 };
 
index 09ca7755dd5558b966833be98ea75c18e5b6efd0..4fe33b8daa9ddf573f8a924f51104d826b0844e7 100644 (file)
 #ifndef _MACH_TEGRA_BOARD_HARMONY_H
 #define _MACH_TEGRA_BOARD_HARMONY_H
 
+#define TEGRA_GPIO_SD2_CD              TEGRA_GPIO_PI5
+#define TEGRA_GPIO_SD2_WP              TEGRA_GPIO_PH1
+#define TEGRA_GPIO_SD2_POWER           TEGRA_GPIO_PT3
+#define TEGRA_GPIO_SD4_CD              TEGRA_GPIO_PH2
+#define TEGRA_GPIO_SD4_WP              TEGRA_GPIO_PH3
+#define TEGRA_GPIO_SD4_POWER           TEGRA_GPIO_PI6
+
 void harmony_pinmux_init(void);
 
 #endif
index 2d6ad83ed4b25d8f26876720cbfb999ed2dc0224..7e96d4918b9eb474d23a403aa1304e9c2ffd8eb6 100644 (file)
@@ -161,11 +161,11 @@ static __initdata struct tegra_pingroup_config seaboard_pinmux[] = {
 
 
 static struct tegra_gpio_table gpio_table[] = {
-       { .gpio = TEGRA_GPIO_PI5,       .enable = true  }, /* mmc2 cd    */
-       { .gpio = TEGRA_GPIO_PH1,       .enable = true  }, /* mmc2 wp    */
-       { .gpio = TEGRA_GPIO_PI6,       .enable = true  }, /* mmc2 pwr   */
-       { .gpio = TEGRA_GPIO_LIDSWITCH, .enable = true  }, /* lid switch */
-       { .gpio = TEGRA_GPIO_POWERKEY,  .enable = true  }, /* power key  */
+       { .gpio = TEGRA_GPIO_SD2_CD,            .enable = true },
+       { .gpio = TEGRA_GPIO_SD2_WP,            .enable = true },
+       { .gpio = TEGRA_GPIO_SD2_POWER,         .enable = true },
+       { .gpio = TEGRA_GPIO_LIDSWITCH,         .enable = true },
+       { .gpio = TEGRA_GPIO_POWERKEY,          .enable = true },
 };
 
 void __init seaboard_pinmux_init(void)
index 6ca9e61f6cd098cb20c3281946c7bfb38592443a..eb28dbdac007adda37345600e8ae76c7fd06fc04 100644 (file)
@@ -103,9 +103,9 @@ static struct tegra_sdhci_platform_data sdhci_pdata1 = {
 };
 
 static struct tegra_sdhci_platform_data sdhci_pdata3 = {
-       .cd_gpio        = TEGRA_GPIO_PI5,
-       .wp_gpio        = TEGRA_GPIO_PH1,
-       .power_gpio     = TEGRA_GPIO_PI6,
+       .cd_gpio        = TEGRA_GPIO_SD2_CD,
+       .wp_gpio        = TEGRA_GPIO_SD2_WP,
+       .power_gpio     = TEGRA_GPIO_SD2_POWER,
 };
 
 static struct tegra_sdhci_platform_data sdhci_pdata4 = {
index a098e3599731ce39018a7a78d1bbefeb116e47b8..d8415e1a8434f21e61eace90c0585fb00268ee94 100644 (file)
@@ -17,6 +17,9 @@
 #ifndef _MACH_TEGRA_BOARD_SEABOARD_H
 #define _MACH_TEGRA_BOARD_SEABOARD_H
 
+#define TEGRA_GPIO_SD2_CD              TEGRA_GPIO_PI5
+#define TEGRA_GPIO_SD2_WP              TEGRA_GPIO_PH1
+#define TEGRA_GPIO_SD2_POWER           TEGRA_GPIO_PI6
 #define TEGRA_GPIO_LIDSWITCH           TEGRA_GPIO_PC7
 #define TEGRA_GPIO_USB1                        TEGRA_GPIO_PD0
 #define TEGRA_GPIO_POWERKEY            TEGRA_GPIO_PV2