Skip to contentSkip to conversation

ARM: dts: exynos: Assign a fixed index to mmc devices on ODROID XU3/4 boards

PATCH In review Markus Reichl 2 participants 4 messages Nov 4, 2020

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

PATCH 1/1 ARM: dts: exynos: Assign a fixed index to mmc devices on ODROID XU3/4 boards

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +5 -0
index e35af40a55cb..91d2840ac8ca 100644
@@ -13,6 +13,11 @@
 #include "exynos5422-odroid-core.dtsi"
 
 / {
+	aliases {
+		mmc0 = &mmc_2;
+		mmc1 = &mmc_0;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hi Markus,

Quoted 6 lines · Markus Reichl

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

Wow, this is a long standing issue, called by others 'a feature'. Good that this has been finally solved.

Quoted 10 lines
---
  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index e35af40a55cb..91d2840ac8ca 100644

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 18

Quoted 6 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +3 -0
@@ -13,6 +13,11 @@
  #include "exynos5422-odroid-core.dtsi"
 
  / {
+	aliases {
+		mmc0 = &mmc_2;
+		mmc1 = &mmc_0;

Frankly, I would keep the MMC numbers the same as in u-boot and datasheets. 0 for the build-in eMMC and 2 for the SD-card. This would be much more natural. On the other hand, I would agree to do it differently only on Odroid HC1/HD2/MC1, which don't have build-in eMMC - just use 0 there for the SD-card.

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 23

Quoted 5 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+	};
+
  	gpio-keys {
  		compatible = "gpio-keys";
  		pinctrl-names = "default";

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#2 lore raw

Hi Marek,

Am 04.11.20 um 13:24 schrieb Marek Szyprowski:

Quoted 25 lines

Hi Markus,

Quoted 6 lines · Markus Reichl

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

Wow, this is a long standing issue, called by others 'a feature'. Good that this has been finally solved.

Quoted 12 lines
---
  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index e35af40a55cb..91d2840ac8ca 100644
@@ -13,6 +13,11 @@
  #include "exynos5422-odroid-core.dtsi"
 
Quoted 10 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 18

Quoted 4 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +3 -0
  / {
+	aliases {
+		mmc0 = &mmc_2;
+		mmc1 = &mmc_0;

Frankly, I would keep the MMC numbers the same as in u-boot and datasheets. 0 for the build-in eMMC and 2 for the SD-card. This would be much more natural. On the other hand, I would agree to do it differently only on Odroid HC1/HD2/MC1, which don't have build-in eMMC - just use 0 there for the SD-card.

This would break present and long standing boot ordering in mainline, which is mmcblk0 = SD-card and
mmcblk1 = eMMC

Still desired?

Quoted 9 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 23

Quoted 6 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+	};
+
  	gpio-keys {
  		compatible = "gpio-keys";
  		pinctrl-names = "default";

Best regards

Gruß,

Signature · 1 line
Markus Reichl
#3 lore raw

Hi Markus,

Quoted 36 lines · Markus Reichl

Am 04.11.20 um 13:24 schrieb Marek Szyprowski:

Quoted 26 lines · Markus Reichl
Quoted 7 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

Wow, this is a long standing issue, called by others 'a feature'. Good that this has been finally solved.

Quoted 14 lines

---
  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 5 +++++

  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1 -0
index e35af40a55cb..91d2840ac8ca 100644
@@ -13,6 +13,11 @@
   #include "exynos5422-odroid-core.dtsi"
     / {
+    aliases {
Quoted 8 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 18

Quoted 2 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+        mmc0 = &mmc_2;
+        mmc1 = &mmc_0;

Frankly, I would keep the MMC numbers the same as in u-boot and datasheets. 0 for the build-in eMMC and 2 for the SD-card. This would be much more natural. On the other hand, I would agree to do it differently only on Odroid HC1/HD2/MC1, which don't have build-in eMMC - just use 0 there for the SD-card.

Quoted 6 lines

This would break present and long standing  boot ordering in mainline, which is
mmcblk0 = SD-card and
mmcblk1 = eMMC

Still desired?

Well, previously (before v4.0? I don't remember exactly when there was a first change), the order was exactly opposite. I think that going for the MMC bus numbers from the datasheet/schematic is the most appropriate approach.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland