Skip to contentSkip to conversation

mmc: omap_hsmmc: get rid of ti,non-removable

PATCH In review Sekhar Nori 6 participants 11 messages Sep 13, 2013 – Sep 18, 2013 4 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover mmc: omap_hsmmc: get rid of ti,non-removable

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

This patch set does not support the old binding anymore. So, yes, it does introduce an ABI breakage. IMHO, it is not really worth supporting both bindings ATM since DT-usage in OMAP is still very nascent and almost always DTB and uImage are upgraded together.

The series applies to Koen's series titled "ARM: dts: Beaglebone MMC fixes"

The patch set is tested on Bone Black, but I could not get the eMMC to detect on my board with or without this patch set. The removable MMC/SD works though.

Sekhar Nori (3):
mmc: omap_hsmmc: remove TI specific DT binding for non removable
cards
ARM: OMAP2+: DT: start using generic binding for non-removable mmc
cards
ARM: OMAP2+: BBB DT: mark eMMC as non removable

 Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt |    5 ++---
 arch/arm/boot/dts/am335x-boneblack.dts                  |    1 +
 arch/arm/boot/dts/omap4-panda-common.dtsi               |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts                         |    4 ++--
 arch/arm/boot/dts/omap4-var-som.dts                     |    2 +-
 arch/arm/boot/dts/omap5-uevm.dts                        |    4 ++--
 drivers/mmc/host/omap_hsmmc.c                           |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.10.1
#1 lore raw

PATCH 1/3 mmc: omap_hsmmc: remove TI specific DT binding for non removable cards

Remove the vendor specific "ti,non-removable" DT binding and support the generic binding "non-removable" instead.

---
 Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt |    5 ++---
 drivers/mmc/host/omap_hsmmc.c                           |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +2 -3
index 8c8908a..0d463b8 100644
@@ -17,7 +17,6 @@ Optional properties:
 ti,dual-volt: boolean, supports dual voltage cards
 <supply-name>-supply: phandle to the regulator device tree node
 "supply-name" examples are "vmmc", "vmmc_aux" etc
-ti,non-removable: non-removable slot (like eMMC)
 ti,needs-special-reset: Requires a special softreset sequence
 ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
 dmas: List of DMA specifiers with the controller specific format
@@ -38,7 +37,7 @@ Examples:
 		ti,dual-volt;
 		bus-width = <4>;
 		vmmc-supply = <&vmmc>; /* phandle to regulator node */
-		ti,non-removable;
+		non-removable;
 	};
 
 [generic DMA request binding]
@@ -50,7 +49,7 @@ Examples:
 		ti,dual-volt;
 		bus-width = <4>;
 		vmmc-supply = <&vmmc>; /* phandle to regulator node */
-		ti,non-removable;
+		non-removable;
 		dmas = <&edma 24
 			&edma 25>;
 		dma-names = "tx", "rx";
drivers/mmc/host/omap_hsmmc.c +1 -1
index 6ac63df..0cb06ff 100644
@@ -1738,7 +1738,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
 	pdata->slots[0].switch_pin = cd_gpio;
 	pdata->slots[0].gpio_wp = wp_gpio;
 
-	if (of_find_property(np, "ti,non-removable", NULL)) {
+	if (of_find_property(np, "non-removable", NULL)) {
 		pdata->slots[0].nonremovable = true;
 		pdata->slots[0].no_regulator_off_init = true;
 	}
Signature · 1 line
1.7.10.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 2/3 ARM: OMAP2+: DT: start using generic binding for non-removable mmc cards

The TI specific binding for non-removable cards is now gone. The driver supports the generic binding, start using it.

---
 arch/arm/boot/dts/omap4-panda-common.dtsi |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts           |    4 ++--
 arch/arm/boot/dts/omap4-var-som.dts       |    2 +-
 arch/arm/boot/dts/omap5-uevm.dts          |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap4-panda-common.dtsi +1 -1
index faa95b5..8dcefc0 100644
@@ -314,7 +314,7 @@
 };
 
 &mmc5 {
-	ti,non-removable;
+	non-removable;
 	bus-width = <4>;
 };
 
arch/arm/boot/dts/omap4-sdp.dts +2 -2
index 7951b4e..ecce3f5 100644
@@ -408,7 +408,7 @@
 &mmc2 {
 	vmmc-supply = <&vaux1>;
 	bus-width = <8>;
-	ti,non-removable;
+	non-removable;
 };
 
 &mmc3 {
@@ -421,7 +421,7 @@
 
 &mmc5 {
 	bus-width = <4>;
-	ti,non-removable;
+	non-removable;
 };
 
 &emif1 {
arch/arm/boot/dts/omap4-var-som.dts +1 -1
index b41269e..b25b9ad 100644
@@ -76,7 +76,7 @@
 &mmc1 {
 	vmmc-supply = <&vmmc>;
 	ti,bus-width = <8>;
-	ti,non-removable;
+	non-removable;
 };
 
 &mmc2 {
arch/arm/boot/dts/omap5-uevm.dts +2 -2
index 65d7b60..67d6ed7 100644
@@ -242,12 +242,12 @@
 &mmc2 {
 	vmmc-supply = <&vmmcsd_fixed>;
 	bus-width = <8>;
-	ti,non-removable;
+	non-removable;
 };
 
 &mmc3 {
 	bus-width = <4>;
-	ti,non-removable;
+	non-removable;
 };
 
 &mmc4 {
Signature · 6 lines
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 3/3 ARM: OMAP2+: BBB DT: mark eMMC as non removable

In reply to a message not in the archive

Mark the eMMC module on BeagleBone black as non removable.

---
 arch/arm/boot/dts/am335x-boneblack.dts |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am335x-boneblack.dts +1 -0
index f4703cf..58515dc 100644
@@ -25,6 +25,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_pins>;
 	bus-width = <8>;
+	non-removable;
 	status = "okay";
 	ti,vcc-aux-disable-is-sleep;
 };
Signature · 6 lines
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): f77adcf96d225b43e38058ddadcab76a9df6914a.1379066249.git.nsekhar-l0cyMroinI0@public.gmane.org

Acked-by
#6 lore raw

Re: [PATCH 3/3] ARM: OMAP2+: BBB DT: mark eMMC as non removable

Op 13 sep. 2013, om 12:09 heeft Sekhar Nori <[email protected]> het volgende geschreven:

Quoted 3 lines

Mark the eMMC module on BeagleBone black as non removable.

Quoted 19 lines

---
arch/arm/boot/dts/am335x-boneblack.dts | 1 +

1 file changed, 1 insertion(+)
arch/arm/boot/dts/am335x-boneblack.dts +1 -0
index f4703cf..58515dc 100644
@@ -25,6 +25,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_pins>;
 	bus-width = <8>;
+	non-removable;
 	status = "okay";
 	ti,vcc-aux-disable-is-sleep;
 };
Signature · 1 line
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Re: [PATCH 3/3] ARM: OMAP2+: BBB DT: mark eMMC as non removable

In reply to a message not in the archive
Quoted 3 lines · Sekhar Nori

Mark the eMMC module on BeagleBone black as non removable.

The patches which touch dts files are not really following the subject line conventions. I will fix that and send a v2.

Thanks to Nishant for pointing out.

Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to a message not in the archive
Quoted 2 lines · Sekhar Nori

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

Looks like there's a different handling in the MMC driver for no_regulator_off_init that's needed for eMMC. That needs to be sorted out and tested first.

Quoted 4 lines

This patch set does not support the old binding anymore. So, yes, it does introduce an ABI breakage. IMHO, it is not really worth supporting both bindings ATM since DT-usage in OMAP is still very nascent and almost always DTB and uImage are upgraded together.

The old bindings must be supported. It's not like we can just drop them. We should just keep the old binding and parse it the same way as the generic binding. That's a minimal amount of code.

After the issue with no_regulator_off_init has been solved, then we can naturally update the existing .dts files to use the generic binding.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw
Quoted 8 lines · Tony Lindgren
Quoted 2 lines · Sekhar Nori

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

Looks like there's a different handling in the MMC driver for no_regulator_off_init that's needed for eMMC. That needs to be sorted out and tested first.

Hi Sekhar,

no_regulator_off_init is needed for eMMC detection on omap4 platforms.

Quoted 13 lines
Quoted 4 lines

This patch set does not support the old binding anymore. So, yes, it does introduce an ABI breakage. IMHO, it is not really worth supporting both bindings ATM since DT-usage in OMAP is still very nascent and almost always DTB and uImage are upgraded together.

The old bindings must be supported. It's not like we can just drop them. We should just keep the old binding and parse it the same way as the generic binding. That's a minimal amount of code.

After the issue with no_regulator_off_init has been solved, then we can naturally update the existing .dts files to use the generic binding.

Quoted 8 lines

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 5 lines · Balaji T K
Quoted 4 lines · Tony Lindgren
Quoted 2 lines · Sekhar Nori

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

Quoted 7 lines
Quoted 4 lines

Looks like there's a different handling in the MMC driver for no_regulator_off_init that's needed for eMMC. That needs to be sorted out and tested first.

Hi Sekhar,

no_regulator_off_init is needed for eMMC detection on omap4 platforms.

Okay, and the code currently does:

	if (of_find_property(np, "non-removable", NULL)) {
		pdata->slots[0].nonremovable = true;
		pdata->slots[0].no_regulator_off_init = true;
	}

Is there anything else that needs to be done?

Thanks,
Sekhar

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
In reply to a message not in the archive
Quoted 7 lines · Tony Lindgren
Quoted 2 lines · Sekhar Nori

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

Looks like there's a different handling in the MMC driver for no_regulator_off_init that's needed for eMMC. That needs to be sorted out and tested first.

Okay. I couldn't really get the eMMC on my board to detect, but apparently Koen has been able to get it to work. I am not really deep into details of HSMMC driver so will check with Balaji on what needs to be done here.

Quoted 8 lines
Quoted 4 lines

This patch set does not support the old binding anymore. So, yes, it does introduce an ABI breakage. IMHO, it is not really worth supporting both bindings ATM since DT-usage in OMAP is still very nascent and almost always DTB and uImage are upgraded together.

The old bindings must be supported. It's not like we can just drop them. We should just keep the old binding and parse it the same way as the generic binding. That's a minimal amount of code.

Yes, its minimal amount of code but its code that will very likely never get exercised in future because of the reasons I mentioned above. I fear in time we will accumulate a lot of unused code this way.

Anyway, since you don't feel its okay to remove the old binding, I will go ahead and mark the old binding as deprecated. But perhaps we can come-up with some time frame within which users of old .dtb can upgrade their .dtb or consider never upgrading to a newer kernel? This sounds eerily similar to feature-removal-schedule.txt and yeah I am aware of what happened to that. But I still put it here since this problem of DTB compatibility is not going to go away.

One thing that might help is a kernel configuration that does not support deprecated bindings so users of old dtbs can actually see what deprecated bindings they are using. This way they can probably plan for a dtb upgrade better. So in driver you would do something like:

	if (of_support_deprecated_bindings() &&
	    of_find_property(np, "ti,non-removable", NULL)) {
		.. do something ..
	}

of_support_deprecated_bindings() would return based on a config option.

Thanks,
Sekhar

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw
Quoted 5 lines · Sekhar Nori
Quoted 4 lines · Tony Lindgren
Quoted 2 lines · Sekhar Nori

Get rid of TI specific binding ti,non-removable in favour of the generic binding present for the same purpose.

Quoted 8 lines
Quoted 3 lines

Looks like there's a different handling in the MMC driver for no_regulator_off_init that's needed for eMMC. That needs to be sorted out and tested first.

Okay. I couldn't really get the eMMC on my board to detect, but apparently Koen has been able to get it to work. I am not really deep into details of HSMMC driver so will check with Balaji on what needs to be done here.

I think the issue is that until we have a SCM driver module setting up the PBIAS register as a regulator, eMMC cards won't work without ti,non-removable.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

This patch set does not support the old binding anymore. So, yes, it does introduce an ABI breakage. IMHO, it is not really worth supporting both bindings ATM since DT-usage in OMAP is still very nascent and almost always DTB and uImage are upgraded together.

Quoted 7 lines
Quoted 3 lines

The old bindings must be supported. It's not like we can just drop them. We should just keep the old binding and parse it the same way as the generic binding. That's a minimal amount of code.

Yes, its minimal amount of code but its code that will very likely never get exercised in future because of the reasons I mentioned above. I fear in time we will accumulate a lot of unused code this way.

Hey it's an ABI :)

Quoted 7 lines

Anyway, since you don't feel its okay to remove the old binding, I will go ahead and mark the old binding as deprecated. But perhaps we can come-up with some time frame within which users of old .dtb can upgrade their .dtb or consider never upgrading to a newer kernel? This sounds eerily similar to feature-removal-schedule.txt and yeah I am aware of what happened to that. But I still put it here since this problem of DTB compatibility is not going to go away.

But before doing that, we first must fix the issue for still needing ti,non-removable.

Quoted 11 lines

One thing that might help is a kernel configuration that does not support deprecated bindings so users of old dtbs can actually see what deprecated bindings they are using. This way they can probably plan for a dtb upgrade better. So in driver you would do something like:

	if (of_support_deprecated_bindings() &&
	    of_find_property(np, "ti,non-removable", NULL)) {
		.. do something ..
	}

of_support_deprecated_bindings() would return based on a config option.

Hmm yeah maybe that should be discussed separately on the device tree mailing list.

Regards,

Tony