[U-Boot] [PATCH V2 1/2] 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 --- V2: Don't include patch 1 with xlate. It is not apparently needed. Remove cd_inverted from omap_hsmmc_plat
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h index 42ce8dcd6d..6d31cc4422 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 8ab56d247d..e9786ec5bb 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; @@ -1377,8 +1376,6 @@ static int omap_hsmmc_getcd(struct udevice *dev) 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;

With the omap_mmc driver no longer supporting cd-inverted, this patch removes all these references since they are not needed.
Signed-off-by: Adam Ford aford173@gmail.com --- V2: No changes
diff --git a/arch/arm/dts/am3517-evm-u-boot.dtsi b/arch/arm/dts/am3517-evm-u-boot.dtsi index c02beaad77..59df819f9d 100644 --- a/arch/arm/dts/am3517-evm-u-boot.dtsi +++ b/arch/arm/dts/am3517-evm-u-boot.dtsi @@ -10,10 +10,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; }; diff --git a/arch/arm/dts/omap3-beagle-u-boot.dtsi b/arch/arm/dts/omap3-beagle-u-boot.dtsi index 094f9557b7..41beaf0900 100644 --- a/arch/arm/dts/omap3-beagle-u-boot.dtsi +++ b/arch/arm/dts/omap3-beagle-u-boot.dtsi @@ -11,10 +11,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; }; diff --git a/arch/arm/dts/omap3-beagle-xm-ab-u-boot.dtsi b/arch/arm/dts/omap3-beagle-xm-ab-u-boot.dtsi index 094f9557b7..41beaf0900 100644 --- a/arch/arm/dts/omap3-beagle-xm-ab-u-boot.dtsi +++ b/arch/arm/dts/omap3-beagle-xm-ab-u-boot.dtsi @@ -11,10 +11,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; }; diff --git a/arch/arm/dts/omap3-beagle-xm-u-boot.dtsi b/arch/arm/dts/omap3-beagle-xm-u-boot.dtsi index 094f9557b7..41beaf0900 100644 --- a/arch/arm/dts/omap3-beagle-xm-u-boot.dtsi +++ b/arch/arm/dts/omap3-beagle-xm-u-boot.dtsi @@ -11,10 +11,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; }; diff --git a/arch/arm/dts/omap3-evm-37xx-u-boot.dtsi b/arch/arm/dts/omap3-evm-37xx-u-boot.dtsi index b09ce0efb5..de411316d8 100644 --- a/arch/arm/dts/omap3-evm-37xx-u-boot.dtsi +++ b/arch/arm/dts/omap3-evm-37xx-u-boot.dtsi @@ -11,10 +11,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; }; diff --git a/arch/arm/dts/omap3-evm-u-boot.dtsi b/arch/arm/dts/omap3-evm-u-boot.dtsi index b09ce0efb5..de411316d8 100644 --- a/arch/arm/dts/omap3-evm-u-boot.dtsi +++ b/arch/arm/dts/omap3-evm-u-boot.dtsi @@ -11,10 +11,6 @@ }; };
-&mmc1 { - cd-inverted; -}; - &uart1 { reg-shift = <2>; };

On Sat, Sep 08, 2018 at 08:16:24AM -0500, Adam Ford wrote:
With the omap_mmc driver no longer supporting cd-inverted, this patch removes all these references since they are not needed.
Signed-off-by: Adam Ford aford173@gmail.com
Applied to u-boot/master, thanks!

On Sat, Sep 08, 2018 at 08:16:23AM -0500, Adam Ford wrote:
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
Applied to u-boot/master, thanks!
participants (2)
-
Adam Ford
-
Tom Rini