summaryrefslogtreecommitdiff
path: root/drivers/mmc/omap_hsmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/omap_hsmmc.c')
-rw-r--r--drivers/mmc/omap_hsmmc.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4d171f457e..ec853d063f 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -83,7 +83,6 @@ struct omap_hsmmc_data {
#if CONFIG_IS_ENABLED(DM_MMC)
struct gpio_desc cd_gpio; /* Change Detect GPIO */
struct gpio_desc wp_gpio; /* Write Protect GPIO */
- bool cd_inverted;
#else
int cd_gpio;
int wp_gpio;
@@ -216,6 +215,10 @@ static unsigned char mmc_board_init(struct mmc *mmc)
/* for cairo board, we need to set up 1.8 Volt bias level on MMC1 */
pbias_lite &= ~PBIASLITEVMODE0;
#endif
+#ifdef CONFIG_TARGET_OMAP3_LOGIC
+ /* For Logic PD board, 1.8V bias to go enable gpio127 for mmc_cd */
+ pbias_lite &= ~PBIASLITEVMODE1;
+#endif
#ifdef CONFIG_MMC_OMAP36XX_PINS
if (get_cpu_family() == CPU_OMAP36XX) {
/* Disable extended drain IO before changing PBIAS */
@@ -1364,17 +1367,15 @@ static int omap_hsmmc_set_ios(struct udevice *dev)
#if CONFIG_IS_ENABLED(DM_MMC)
static int omap_hsmmc_getcd(struct udevice *dev)
{
- struct omap_hsmmc_data *priv = dev_get_priv(dev);
int value = -1;
#if CONFIG_IS_ENABLED(DM_GPIO)
+ struct omap_hsmmc_data *priv = dev_get_priv(dev);
value = dm_gpio_get_value(&priv->cd_gpio);
#endif
/* if no CD return as 1 */
if (value < 0)
return 1;
- if (priv->cd_inverted)
- return !value;
return value;
}
@@ -1856,10 +1857,6 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
}
#endif
-#ifdef OMAP_HSMMC_USE_GPIO
- plat->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
-#endif
-
return 0;
}
#endif
@@ -1888,9 +1885,6 @@ static int omap_hsmmc_probe(struct udevice *dev)
priv->base_addr = plat->base_addr;
priv->controller_flags = plat->controller_flags;
priv->hw_rev = plat->hw_rev;
-#ifdef OMAP_HSMMC_USE_GPIO
- priv->cd_inverted = plat->cd_inverted;
-#endif
#ifdef CONFIG_BLK
mmc = plat->mmc;