diff options
author | Adam Ford <aford173@gmail.com> | 2018-09-08 08:16:23 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-29 08:06:56 -0400 |
commit | f4df405f0e7ee22e24ff19bb8057b21c9e80dd2a (patch) | |
tree | b40c7fe17dd93eeafcfb97ae6ddad8f225e74744 | |
parent | 57fb8b4654a1ca81af38085de411af7a09be911a (diff) | |
download | u-boot-f4df405f0e7ee22e24ff19bb8057b21c9e80dd2a.zip u-boot-f4df405f0e7ee22e24ff19bb8057b21c9e80dd2a.tar.gz u-boot-f4df405f0e7ee22e24ff19bb8057b21c9e80dd2a.tar.bz2 |
mmc: omap_mmc: Remove invert references
With DM_GPIO and DM_MMC translating GPIO_ACTIVE_LOW, any boards
using the 'cd-invert' option will no longer need to do this. This
patch removes the support for 'invert' from the MMC driver.
Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Fix warning over when !DM_GPIO]
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | arch/arm/include/asm/omap_mmc.h | 1 | ||||
-rw-r--r-- | drivers/mmc/omap_hsmmc.c | 12 |
2 files changed, 1 insertions, 12 deletions
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h index 42ce8dc..6d31cc4 100644 --- a/arch/arm/include/asm/omap_mmc.h +++ b/arch/arm/include/asm/omap_mmc.h @@ -68,7 +68,6 @@ struct omap_hsmmc_plat { struct mmc_config cfg; struct hsmmc *base_addr; struct mmc *mmc; - bool cd_inverted; u32 controller_flags; const char *hw_rev; }; diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 8ab56d2..ec853d0 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; @@ -1368,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; } @@ -1860,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 @@ -1892,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; |