Skip to contentSkip to conversation

mmc: omap_mmc: Remove invert references

PATCH New Adam Ford 2 participants 4 messages Sep 8, 2018 – Sep 29, 2018

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

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.

---
V2: Don't include patch 1 with xlate. It is not apparently needed.
Remove cd_inverted from omap_hsmmc_plat

arch/arm/include/asm/omap_mmc.h +0 -1
index 42ce8dcd6d..6d31cc4422 100644
@@ -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;
 };
drivers/mmc/omap_hsmmc.c +0 -10
index 8ab56d247d..e9786ec5bb 100644
@@ -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;
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 2/2 ARM: DTS: various omap3: Remove cd-inverted from u-boot.dtsi

With the omap_mmc driver no longer supporting cd-inverted, this patch removes all these references since they are not needed.

---
V2: No changes

arch/arm/dts/am3517-evm-u-boot.dtsi +0 -4
index c02beaad77..59df819f9d 100644
@@ -10,10 +10,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
arch/arm/dts/omap3-beagle-u-boot.dtsi +0 -4
index 094f9557b7..41beaf0900 100644
@@ -11,10 +11,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
arch/arm/dts/omap3-beagle-xm-ab-u-boot.dtsi +0 -4
index 094f9557b7..41beaf0900 100644
@@ -11,10 +11,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
arch/arm/dts/omap3-beagle-xm-u-boot.dtsi +0 -4
index 094f9557b7..41beaf0900 100644
@@ -11,10 +11,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
arch/arm/dts/omap3-evm-37xx-u-boot.dtsi +0 -4
index b09ce0efb5..de411316d8 100644
@@ -11,10 +11,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
arch/arm/dts/omap3-evm-u-boot.dtsi +0 -4
index b09ce0efb5..de411316d8 100644
@@ -11,10 +11,6 @@
 	};
 };
 
-&mmc1 {
-	cd-inverted;
-};
-
 &uart1 {
 	reg-shift = <2>;
 };
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/2 ARM: DTS: various omap3: Remove cd-inverted from u-boot.dtsi

Quoted 4 lines · Adam Ford

With the omap_mmc driver no longer supporting cd-inverted, this patch removes all these references since they are not needed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180929/905c7188/attachment.sig>
#3 lore raw

PATCH v2 1/2 mmc: omap_mmc: Remove invert references

In reply to Adam Ford
Quoted 5 lines · Adam Ford

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180929/757bf92e/attachment.sig>