diff mbox series

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

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

Commit Message

Alexander Stein Feb. 3, 2021, 7:28 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>
---
Changes in v3:
* Added comment on intented ordering

 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

Alexander Stein Feb. 18, 2021, 6:09 p.m. UTC | #1
Am Mittwoch, 3. Februar 2021, 20:28:24 CET schrieb Alexander Stein:
> 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>

Any feedback on this?

Best regards,
Alexander
Kevin Hilman March 8, 2021, 5:39 p.m. UTC | #2
On Wed, 3 Feb 2021 20:28:24 +0100, Alexander Stein wrote:
> 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.")
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices
      commit: 7827db7f6141fda9af4b07864cab0c10398affff

Best regards,
Kevin Hilman March 8, 2021, 5:43 p.m. UTC | #3
Alexander Stein <alexander.stein@mailbox.org> writes:

> Am Mittwoch, 3. Februar 2021, 20:28:24 CET schrieb Alexander Stein:
>> 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>
>
> Any feedback on this?

Sorry for the delay.

I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
it up for v5.13 now so it should get broader testing in linux-next now.

Kevin
Alexander Stein Oct. 2, 2021, 6:56 a.m. UTC | #4
Hello Kevin,

Am Montag, 8. März 2021, 18:43:35 CEST schrieb Kevin Hilman:
> [...]
> Sorry for the delay.
> 
> I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
> it up for v5.13 now so it should get broader testing in linux-next now.

Was this patch [1] missed again by mistake? I can't find it in linux-next or 
anywhere else. [2] also shows that this commit is not referenced from any 
branch.

Best regards,
Alexander

[1] https://patchwork.kernel.org/project/linux-amlogic/patch/
20210203192824.854491-1-alexander.stein@mailbox.org/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?
id=7827db7f6141fda9af4b07864cab0c10398affff
Neil Armstrong Oct. 2, 2021, 8:49 a.m. UTC | #5
Hi Alexander,

Le 02/10/2021 à 08:56, Alexander Stein a écrit :
> Hello Kevin,
> 
> Am Montag, 8. März 2021, 18:43:35 CEST schrieb Kevin Hilman:
>> [...]
>> Sorry for the delay.
>>
>> I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
>> it up for v5.13 now so it should get broader testing in linux-next now.
> 
> Was this patch [1] missed again by mistake? I can't find it in linux-next or 
> anywhere else. [2] also shows that this commit is not referenced from any 
> branch.

Look at https://github.com/torvalds/linux/blame/53d5fc89d66a778577295020dc57bb3ccec84354/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi#L21

The commit https://github.com/torvalds/linux/commit/ab547c4fb39fe145b39e3013633258a5ff475d88 is upstream since v5.13-rc1

Neil

> 
> Best regards,
> Alexander
> 
> [1] https://patchwork.kernel.org/project/linux-amlogic/patch/
> 20210203192824.854491-1-alexander.stein@mailbox.org/
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?
> id=7827db7f6141fda9af4b07864cab0c10398affff
> 
>
Alexander Stein Oct. 2, 2021, 8:54 a.m. UTC | #6
Hello Neil,

Am Samstag, 2. Oktober 2021, 10:49:46 CEST schrieb Neil Armstrong:
> Look at
> https://github.com/torvalds/linux/blame/53d5fc89d66a778577295020dc57bb3ccec
> 84354/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi#L21
> 
> The commit
> https://github.com/torvalds/linux/commit/ab547c4fb39fe145b39e3013633258a5ff
> 475d88 is upstream since v5.13-rc1

Ah, the SHA1 changed. Dunno why I didn't see it in mainline though.
Thanks for the update and sorry for the noise.

Best regards,
Alexander
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..f9a42f45ac52 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; /* SD card */
+		mmc1 = &sd_emmc_c; /* eMMC */
+		mmc2 = &sd_emmc_a; /* SDIO */
+	};
+
 	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..59d11f65c7b3 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; /* SD card */
+		mmc1 = &sd_emmc_c; /* eMMC */
+		mmc2 = &sd_emmc_a; /* SDIO */
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;