All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
@ 2021-01-27  5:46 ` Sergey Matyukevich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey Matyukevich @ 2021-01-27  5:46 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel
  Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Sergey Matyukevich

Driver sunxi-mmc has recently been switched to asynchronous probe.
As a result, mmc indexes can be shuffled breaking existing setups
where UUIDs are not used for boot devices. Pin mmc indexes to keep
running the systems where fixed MMC or eMMC are specified,
e.g. root=/dev/mmcblk0p2.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 .../arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index de19e68eb84e..c4854d3ba524 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -13,6 +13,9 @@ / {
 
 	aliases {
 		serial0 = &uart0;
+		mmc0 = &mmc0;
+		mmc1 = &mmc1;
+		mmc2 = &mmc2;
 	};
 
 	chosen {
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
@ 2021-01-27  5:46 ` Sergey Matyukevich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey Matyukevich @ 2021-01-27  5:46 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel
  Cc: Chen-Yu Tsai, Sergey Matyukevich, Jernej Skrabec, Maxime Ripard

Driver sunxi-mmc has recently been switched to asynchronous probe.
As a result, mmc indexes can be shuffled breaking existing setups
where UUIDs are not used for boot devices. Pin mmc indexes to keep
running the systems where fixed MMC or eMMC are specified,
e.g. root=/dev/mmcblk0p2.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 .../arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index de19e68eb84e..c4854d3ba524 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -13,6 +13,9 @@ / {
 
 	aliases {
 		serial0 = &uart0;
+		mmc0 = &mmc0;
+		mmc1 = &mmc1;
+		mmc2 = &mmc2;
 	};
 
 	chosen {
-- 
2.30.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
  2021-01-27  5:46 ` Sergey Matyukevich
@ 2021-02-03  9:29   ` Maxime Ripard
  -1 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-02-03  9:29 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: devicetree, linux-arm-kernel, Chen-Yu Tsai, Jernej Skrabec

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Hi,

On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> Driver sunxi-mmc has recently been switched to asynchronous probe.
> As a result, mmc indexes can be shuffled breaking existing setups
> where UUIDs are not used for boot devices. Pin mmc indexes to keep
> running the systems where fixed MMC or eMMC are specified,
> e.g. root=/dev/mmcblk0p2.
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

I'm not sure, really.

That would change the indices once again, and you shouldn't really rely
on them anyway, there's never been any guarantee on the order of any
device.

And whatever the outcome of that discussion, it definitely shouldn't be
done for a single board.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
@ 2021-02-03  9:29   ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-02-03  9:29 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: devicetree, Chen-Yu Tsai, Jernej Skrabec, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

Hi,

On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> Driver sunxi-mmc has recently been switched to asynchronous probe.
> As a result, mmc indexes can be shuffled breaking existing setups
> where UUIDs are not used for boot devices. Pin mmc indexes to keep
> running the systems where fixed MMC or eMMC are specified,
> e.g. root=/dev/mmcblk0p2.
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

I'm not sure, really.

That would change the indices once again, and you shouldn't really rely
on them anyway, there's never been any guarantee on the order of any
device.

And whatever the outcome of that discussion, it definitely shouldn't be
done for a single board.

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
  2021-02-03  9:29   ` Maxime Ripard
@ 2021-02-03  9:36     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2021-02-03  9:36 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Sergey Matyukevich, devicetree, linux-arm-kernel, Jernej Skrabec

On Wed, Feb 3, 2021 at 5:29 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> > Driver sunxi-mmc has recently been switched to asynchronous probe.
> > As a result, mmc indexes can be shuffled breaking existing setups
> > where UUIDs are not used for boot devices. Pin mmc indexes to keep
> > running the systems where fixed MMC or eMMC are specified,
> > e.g. root=/dev/mmcblk0p2.
> >
> > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
>
> I'm not sure, really.
>
> That would change the indices once again, and you shouldn't really rely
> on them anyway, there's never been any guarantee on the order of any
> device.

I assume one reason people want stable MMC indices is for setting the
root device. This could be done with UUID or PARTUUID. Another would
be setting the LED trigger to some MMC device, preferably in the DT
so it kicks in when the LED device is created. Though even that isn't
guaranteed since the MMC could probe after the LED. :(

Currently I'm using some shell script to parse the root device then
get the device name and program that as an LED trigger through sysfs.

> And whatever the outcome of that discussion, it definitely shouldn't be
> done for a single board.

I believe this should be done at the SoC level so we would have consistent
MMC indices across the board. However that seems to conflict with the order
swap we currently have in U-boot to support eMMCs seamlessly.

Regards
ChenYu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
@ 2021-02-03  9:36     ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2021-02-03  9:36 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: devicetree, Jernej Skrabec, linux-arm-kernel, Sergey Matyukevich

On Wed, Feb 3, 2021 at 5:29 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> > Driver sunxi-mmc has recently been switched to asynchronous probe.
> > As a result, mmc indexes can be shuffled breaking existing setups
> > where UUIDs are not used for boot devices. Pin mmc indexes to keep
> > running the systems where fixed MMC or eMMC are specified,
> > e.g. root=/dev/mmcblk0p2.
> >
> > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
>
> I'm not sure, really.
>
> That would change the indices once again, and you shouldn't really rely
> on them anyway, there's never been any guarantee on the order of any
> device.

I assume one reason people want stable MMC indices is for setting the
root device. This could be done with UUID or PARTUUID. Another would
be setting the LED trigger to some MMC device, preferably in the DT
so it kicks in when the LED device is created. Though even that isn't
guaranteed since the MMC could probe after the LED. :(

Currently I'm using some shell script to parse the root device then
get the device name and program that as an LED trigger through sysfs.

> And whatever the outcome of that discussion, it definitely shouldn't be
> done for a single board.

I believe this should be done at the SoC level so we would have consistent
MMC indices across the board. However that seems to conflict with the order
swap we currently have in U-boot to support eMMCs seamlessly.

Regards
ChenYu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
  2021-02-03  9:36     ` Chen-Yu Tsai
@ 2021-02-03 10:00       ` Maxime Ripard
  -1 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-02-03 10:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Sergey Matyukevich, devicetree, linux-arm-kernel, Jernej Skrabec

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

On Wed, Feb 03, 2021 at 05:36:58PM +0800, Chen-Yu Tsai wrote:
> On Wed, Feb 3, 2021 at 5:29 PM Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > Hi,
> >
> > On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> > > Driver sunxi-mmc has recently been switched to asynchronous probe.
> > > As a result, mmc indexes can be shuffled breaking existing setups
> > > where UUIDs are not used for boot devices. Pin mmc indexes to keep
> > > running the systems where fixed MMC or eMMC are specified,
> > > e.g. root=/dev/mmcblk0p2.
> > >
> > > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> >
> > I'm not sure, really.
> >
> > That would change the indices once again, and you shouldn't really rely
> > on them anyway, there's never been any guarantee on the order of any
> > device.
> 
> I assume one reason people want stable MMC indices is for setting the
> root device. This could be done with UUID or PARTUUID.

PARTLABEL is also an option

> Another would be setting the LED trigger to some MMC device,
> preferably in the DT so it kicks in when the LED device is created.
> Though even that isn't guaranteed since the MMC could probe after the
> LED. :(
> 
> Currently I'm using some shell script to parse the root device then
> get the device name and program that as an LED trigger through sysfs.

Surely a udev / mdev rule can help there?

> > And whatever the outcome of that discussion, it definitely shouldn't be
> > done for a single board.
> 
> I believe this should be done at the SoC level so we would have consistent
> MMC indices across the board. However that seems to conflict with the order
> swap we currently have in U-boot to support eMMCs seamlessly.

I'm not sure we can do it at the SoC level anyway: if only the emmc is
enabled, we want it to be mmcblk0

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes
@ 2021-02-03 10:00       ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-02-03 10:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, linux-arm-kernel, Sergey Matyukevich


[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]

On Wed, Feb 03, 2021 at 05:36:58PM +0800, Chen-Yu Tsai wrote:
> On Wed, Feb 3, 2021 at 5:29 PM Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > Hi,
> >
> > On Wed, Jan 27, 2021 at 08:46:20AM +0300, Sergey Matyukevich wrote:
> > > Driver sunxi-mmc has recently been switched to asynchronous probe.
> > > As a result, mmc indexes can be shuffled breaking existing setups
> > > where UUIDs are not used for boot devices. Pin mmc indexes to keep
> > > running the systems where fixed MMC or eMMC are specified,
> > > e.g. root=/dev/mmcblk0p2.
> > >
> > > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> >
> > I'm not sure, really.
> >
> > That would change the indices once again, and you shouldn't really rely
> > on them anyway, there's never been any guarantee on the order of any
> > device.
> 
> I assume one reason people want stable MMC indices is for setting the
> root device. This could be done with UUID or PARTUUID.

PARTLABEL is also an option

> Another would be setting the LED trigger to some MMC device,
> preferably in the DT so it kicks in when the LED device is created.
> Though even that isn't guaranteed since the MMC could probe after the
> LED. :(
> 
> Currently I'm using some shell script to parse the root device then
> get the device name and program that as an LED trigger through sysfs.

Surely a udev / mdev rule can help there?

> > And whatever the outcome of that discussion, it definitely shouldn't be
> > done for a single board.
> 
> I believe this should be done at the SoC level so we would have consistent
> MMC indices across the board. However that seems to conflict with the order
> swap we currently have in U-boot to support eMMCs seamlessly.

I'm not sure we can do it at the SoC level anyway: if only the emmc is
enabled, we want it to be mmcblk0

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-03 10:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  5:46 [PATCH 1/1] ARM: dts: orange-pi-zero-plus2: use fixed mmc indexes Sergey Matyukevich
2021-01-27  5:46 ` Sergey Matyukevich
2021-02-03  9:29 ` Maxime Ripard
2021-02-03  9:29   ` Maxime Ripard
2021-02-03  9:36   ` Chen-Yu Tsai
2021-02-03  9:36     ` Chen-Yu Tsai
2021-02-03 10:00     ` Maxime Ripard
2021-02-03 10:00       ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.