diff mbox series

[v2,1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

Message ID 20210202170328.79929-1-alexander.stein@mailbox.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices | expand

Commit Message

Alexander Stein Feb. 2, 2021, 5:03 p.m. UTC
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
---
Just for the records, I only tested this on my ODROID-N2 (G12 based) board.

 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi         | 6 ++++++
 2 files changed, 12 insertions(+)

Comments

Kevin Hilman Feb. 3, 2021, 7:20 p.m. UTC | #1
Alexander Stein <alexander.stein@mailbox.org> writes:

> Recently introduced async probe on mmc devices can shuffle block IDs.
> Pin them to fixed values to ease booting in environments where UUIDs
> are not practical. Use newly introduced aliases for mmcblk devices from [1].
> [1]
> https://patchwork.kernel.org/patch/11747669/
>
> Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")
>
> The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
> (according to the comments) only used for SDIO.
>
> AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
> them enabled. So the alias order should match the previous non-async order
> for all of them.
>
> Signed-off-by: Alexander Stein <alexander.stein@mailbox.org>
> ---
> Just for the records, I only tested this on my ODROID-N2 (G12 based) board.
>
>  arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi         | 6 ++++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index 9c90d562ada1..15525f3aa4a6 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -17,6 +17,12 @@ / {
>  	#address-cells = <2>;
>  	#size-cells = <2>;
>  
> +	aliases {
> +		mmc0 = &sd_emmc_b;
> +		mmc1 = &sd_emmc_c;
> +		mmc2 = &sd_emmc_a;
> +	};
> +

Thanks for updating this.

minor nit: as I suggested earlier, could you add comments here showing the
intention that mmc0 -> SD, mmc1 -> eMMC, mmc2 -> SDIO

Kevin
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 9c90d562ada1..15525f3aa4a6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -17,6 +17,12 @@  / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
+		mmc2 = &sd_emmc_a;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 726b91d3a905..769d7e8fda13 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -21,6 +21,12 @@  / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
+		mmc2 = &sd_emmc_a;
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;