ARM: tegra: sdhci: Set wp gpio for sdmmc3
Naveen Kumar Arepalli [Fri, 24 May 2013 03:38:36 +0000 (08:38 +0530)]
Set wp gpio for sdmmc3 on dalmore and macallan

Bug 1288218

Change-Id: I13e30ca4aa9ce896867de10c963e1e61c4bce43a
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/231442
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

arch/arm/mach-tegra/board-dalmore-sdhci.c
arch/arm/mach-tegra/board-macallan-sdhci.c

index dc19769..83e00e0 100644 (file)
@@ -43,6 +43,7 @@
 #define DALMORE_WLAN_RST       TEGRA_GPIO_PX7
 #define DALMORE_WLAN_WOW       TEGRA_GPIO_PU5
 #define DALMORE_SD_CD          TEGRA_GPIO_PV2
+#define DALMORE_SD_WP          TEGRA_GPIO_PQ4
 static void (*wifi_status_cb)(int card_present, void *dev_id);
 static void *wifi_status_cb_devid;
 static int dalmore_wifi_status_register(void (*callback)(int , void *), void *);
@@ -156,7 +157,7 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data0 = {
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
        .cd_gpio = DALMORE_SD_CD,
-       .wp_gpio = -1,
+       .wp_gpio = DALMORE_SD_WP,
        .power_gpio = -1,
        .tap_delay = 0x3,
        .trim_delay = 0x3,
@@ -396,7 +397,7 @@ int __init dalmore_sdhci_init(void)
 {
        int nominal_core_mv;
        int min_vcore_override_mv;
-
+       struct board_info board_info;
        nominal_core_mv =
                tegra_dvfs_rail_get_nominal_millivolts(tegra_core_rail);
        if (nominal_core_mv) {
@@ -418,7 +419,9 @@ int __init dalmore_sdhci_init(void)
                && (!(tegra_sdhci_platform_data3.uhs_mask &
                MMC_UHS_MASK_DDR50)))
                tegra_sdhci_platform_data3.trim_delay = 0;
-
+       tegra_get_board_info(&board_info);
+       if (board_info.fab == BOARD_FAB_A05)
+               tegra_sdhci_platform_data2.wp_gpio = -1;
        platform_device_register(&tegra_sdhci_device3);
        platform_device_register(&tegra_sdhci_device2);
        platform_device_register(&tegra_sdhci_device0);
index 065bb2b..a5c7659 100644 (file)
@@ -37,6 +37,7 @@
 #include "dvfs.h"
 
 #define MACALLAN_SD_CD TEGRA_GPIO_PV2
+#define MACALLAN_SD_WP TEGRA_GPIO_PQ4
 #define MACALLAN_WLAN_PWR      TEGRA_GPIO_PCC5
 #define MACALLAN_WLAN_RST      TEGRA_GPIO_PX7
 #define MACALLAN_WLAN_WOW      TEGRA_GPIO_PU5
@@ -135,7 +136,7 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data0 = {
 
 static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
        .cd_gpio = MACALLAN_SD_CD,
-       .wp_gpio = -1,
+       .wp_gpio = MACALLAN_SD_WP,
        .power_gpio = -1,
        .tap_delay = 0x3,
        .trim_delay = 0x3,