mmc: sdhci-sprd: remove prefer asynchronous probe
Subsystems (3)
PATCH 1/1 mmc: sdhci-sprd: remove prefer asynchronous probe
The prefer asynchronous probe affects the order of device probes.
--- drivers/mmc/host/sdhci-sprd.c | 1 - 1 file changed, 1 deletion(-)
drivers/mmc/host/sdhci-sprd.c +0 -1
@@ -801,7 +801,6 @@ static struct platform_driver sdhci_sprd_driver = { .remove = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sdhci_sprd_of_match, .pm = &sdhci_sprd_pm_ops, },
Signature · 1 line
2.17.1
Quoted 2 lines · Wenchao Chen
The prefer asynchronous probe affects the order of device probes.
Is there a problem with this? If so, can you elaborate on what kind of problems?
Quoted 3 lines
Fixes d86472ae8b20 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v5.4")Signed-off-by Wenchao Chen <[email protected]>
Kind regards
Uffe
Quoted 19 lines
--- drivers/mmc/host/sdhci-sprd.c | 1 - 1 file changed, 1 deletion(-)drivers/mmc/host/sdhci-sprd.c +0
-2@@ -801,7 +801,6 @@ static struct platform_driver sdhci_sprd_driver = { .remove = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sdhci_sprd_of_match, .pm = &sdhci_sprd_pm_ops, }, --2.17.1
Quoted 7 lines · Ulf Hansson
Quoted 2 lines · Wenchao Chen
The prefer asynchronous probe affects the order of device probes.
Is there a problem with this? If so, can you elaborate on what kind of problems?
Hi Uffe
dts:
sdio0: sdio@71100000 {
...
bus-width = <4>;
no-sdio;
no-mmc;
...
}; // SD Host(Device: SD CARD)
sdio3: sdio@71400000 {
...
bus-width = <8>;
non-removable;
no-sdio;
no-sd;
...
}; // eMMC Host(Device: eMMC)
According to the order of DTS: sdio0: sdio@71100000 is MMC0, sdio3:
sdio@71400000 is MMC1.
Log:
[ 1.714617][ T11] mmc1: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.715276][ T9] mmc0: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.884525][ T75] mmc1: Host Software Queue enabled [ 1.890965][ T75] mmc1: new HS400 Enhanced strobe MMC card at address 0001
But set prefer_asynchronous_probe, sometimes there will be sdio0:
sdio@71100000 is MMC1, sdio3: sdio@71400000 is MMC0. Log:
[ 1.619888][ T68] mmc0: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.620534][ T9] mmc1: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.792570][ T77] mmc0: Host Software Queue enabled [ 1.799532][ T77] mmc0: new HS400 Enhanced strobe MMC card at address 0001
We use emmc as rootfs (without ramfs or initfs), but with SD card inserted and not inserted, the partition name of emmc is different, we need to fix this partition name.
Quoted 26 lines
Quoted 3 lines
Fixes d86472ae8b20 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v5.4")Signed-off-by Wenchao Chen <[email protected]>Kind regards
UffeQuoted 19 lines
--- drivers/mmc/host/sdhci-sprd.c | 1 - 1 file changed, 1 deletion(-)drivers/mmc/host/sdhci-sprd.c +0
-2@@ -801,7 +801,6 @@ static struct platform_driver sdhci_sprd_driver = { .remove = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", - .probe_type = PROBE_PREFER_ASYNCHRONOUS, .of_match_table = sdhci_sprd_of_match, .pm = &sdhci_sprd_pm_ops, }, --2.17.1
Quoted 42 lines · Wenchao Chen
Quoted 7 lines · Ulf Hansson
Quoted 2 lines · Wenchao Chen
The prefer asynchronous probe affects the order of device probes.
Is there a problem with this? If so, can you elaborate on what kind of problems?
Hi Uffe
dts:
sdio0: sdio@71100000 {
...
bus-width = <4>;
no-sdio;
no-mmc;
...
}; // SD Host(Device: SD CARD)sdio3: sdio@71400000 {
...
bus-width = <8>;
non-removable;
no-sdio;
no-sd;
...
}; // eMMC Host(Device: eMMC)According to the order of DTS: sdio0: sdio@71100000 is MMC0, sdio3:
sdio@71400000 is MMC1.
Log:[ 1.714617][ T11] mmc1: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.715276][ T9] mmc0: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.884525][ T75] mmc1: Host Software Queue enabled [ 1.890965][ T75] mmc1: new HS400 Enhanced strobe MMC card at address 0001But set
prefer_asynchronous_probe, sometimes there will be sdio0:
sdio@71100000 is MMC1, sdio3: sdio@71400000 is MMC0. Log:
Quoted 6 lines
[ 1.619888][ T68] mmc0: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.620534][ T9] mmc1: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.792570][ T77] mmc0: Host Software Queue enabled [ 1.799532][ T77] mmc0: new HS400 Enhanced strobe MMC card at address 0001
Neither the order of the nodes in DT or dropping PROBE_PREFER_ASYNCHRONOUS provides the guarantees that you suggest above. In fact, that has never been the case for eMMC/SD cards.
Quoted 4 lines
We use emmc as rootfs (without ramfs or initfs), but with SD card inserted and not inserted, the partition name of emmc is different, we need to fix this partition name.
If you can't use PARTUUID/UUID, which is certainly the preferred solution - you may also assign a fixed index mmcN to an MMC host controller and its corresponding mmcblk[n] devices, by defining an alias in the /aliases device tree node.
[...]
Kind regards
Uffe
Quoted 56 lines · Ulf Hansson
Quoted 42 lines · Wenchao Chen
Quoted 7 lines · Ulf Hansson
Quoted 2 lines · Wenchao Chen
The prefer asynchronous probe affects the order of device probes.
Is there a problem with this? If so, can you elaborate on what kind of problems?
Hi Uffe
dts:
sdio0: sdio@71100000 {
...
bus-width = <4>;
no-sdio;
no-mmc;
...
}; // SD Host(Device: SD CARD)sdio3: sdio@71400000 {
...
bus-width = <8>;
non-removable;
no-sdio;
no-sd;
...
}; // eMMC Host(Device: eMMC)According to the order of DTS: sdio0: sdio@71100000 is MMC0, sdio3:
sdio@71400000 is MMC1.
Log:[ 1.714617][ T11] mmc1: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.715276][ T9] mmc0: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.884525][ T75] mmc1: Host Software Queue enabled [ 1.890965][ T75] mmc1: new HS400 Enhanced strobe MMC card at address 0001But set
prefer_asynchronous_probe, sometimes there will be sdio0:
sdio@71100000 is MMC1, sdio3: sdio@71400000 is MMC0. Log:Quoted 6 lines
[ 1.619888][ T68] mmc0: SDHCI controller on 71400000.sdio [71400000.sdio] using ADMA 64-bit [ 1.620534][ T9] mmc1: SDHCI controller on 71100000.sdio [71100000.sdio] using ADMA 64-bit [ 1.792570][ T77] mmc0: Host Software Queue enabled [ 1.799532][ T77] mmc0: new HS400 Enhanced strobe MMC card at address 0001Neither the order of the nodes in DT or dropping
PROBE_PREFER_ASYNCHRONOUSprovides the guarantees that you suggest above. In fact, that has never been the case for eMMC/SD cards.Quoted 1 line
Quoted 9 lines
Quoted 3 lines
We use emmc as rootfs (without ramfs or initfs), but with SD card inserted and not inserted, the partition name of emmc is different, we need to fix this partition name.
If you can't use PARTUUID/UUID, which is certainly the preferred solution - you may also assign a fixed index mmcN to an MMC host controller and its corresponding mmcblk[n] devices, by defining an alias in the /aliases device tree node.
You're right.
aliases {
...
mmc0 = &sdio3;
mmc1 = &sdio0;
...
};Thank you very much.
Quoted 4 lines
[...]
Kind regards
Uffe