mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
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>
This commit is contained in:
@@ -68,7 +68,6 @@ struct omap_hsmmc_plat {
|
|||||||
struct mmc_config cfg;
|
struct mmc_config cfg;
|
||||||
struct hsmmc *base_addr;
|
struct hsmmc *base_addr;
|
||||||
struct mmc *mmc;
|
struct mmc *mmc;
|
||||||
bool cd_inverted;
|
|
||||||
u32 controller_flags;
|
u32 controller_flags;
|
||||||
const char *hw_rev;
|
const char *hw_rev;
|
||||||
};
|
};
|
||||||
|
@@ -83,7 +83,6 @@ struct omap_hsmmc_data {
|
|||||||
#if CONFIG_IS_ENABLED(DM_MMC)
|
#if CONFIG_IS_ENABLED(DM_MMC)
|
||||||
struct gpio_desc cd_gpio; /* Change Detect GPIO */
|
struct gpio_desc cd_gpio; /* Change Detect GPIO */
|
||||||
struct gpio_desc wp_gpio; /* Write Protect GPIO */
|
struct gpio_desc wp_gpio; /* Write Protect GPIO */
|
||||||
bool cd_inverted;
|
|
||||||
#else
|
#else
|
||||||
int cd_gpio;
|
int cd_gpio;
|
||||||
int wp_gpio;
|
int wp_gpio;
|
||||||
@@ -1368,17 +1367,15 @@ static int omap_hsmmc_set_ios(struct udevice *dev)
|
|||||||
#if CONFIG_IS_ENABLED(DM_MMC)
|
#if CONFIG_IS_ENABLED(DM_MMC)
|
||||||
static int omap_hsmmc_getcd(struct udevice *dev)
|
static int omap_hsmmc_getcd(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct omap_hsmmc_data *priv = dev_get_priv(dev);
|
|
||||||
int value = -1;
|
int value = -1;
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
#if CONFIG_IS_ENABLED(DM_GPIO)
|
||||||
|
struct omap_hsmmc_data *priv = dev_get_priv(dev);
|
||||||
value = dm_gpio_get_value(&priv->cd_gpio);
|
value = dm_gpio_get_value(&priv->cd_gpio);
|
||||||
#endif
|
#endif
|
||||||
/* if no CD return as 1 */
|
/* if no CD return as 1 */
|
||||||
if (value < 0)
|
if (value < 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (priv->cd_inverted)
|
|
||||||
return !value;
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1860,10 +1857,6 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OMAP_HSMMC_USE_GPIO
|
|
||||||
plat->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1892,9 +1885,6 @@ static int omap_hsmmc_probe(struct udevice *dev)
|
|||||||
priv->base_addr = plat->base_addr;
|
priv->base_addr = plat->base_addr;
|
||||||
priv->controller_flags = plat->controller_flags;
|
priv->controller_flags = plat->controller_flags;
|
||||||
priv->hw_rev = plat->hw_rev;
|
priv->hw_rev = plat->hw_rev;
|
||||||
#ifdef OMAP_HSMMC_USE_GPIO
|
|
||||||
priv->cd_inverted = plat->cd_inverted;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BLK
|
#ifdef CONFIG_BLK
|
||||||
mmc = plat->mmc;
|
mmc = plat->mmc;
|
||||||
|
Reference in New Issue
Block a user