mmc: Fix partition table init regression
Subsystems (2)
cover mmc: Fix partition table init regression
Commit d0851c893706 ("blk: Call part_init() in the post_probe() method") in the 2019.01-rc1 merge window moved the partition init call to the generic DM layer, leaving every non-DM driver behind. As the result all Allwinner boards now don't read the partition table automatically anymore:
=> fatls mmc 0
** Unrecognized filesystem type **
=> fatload mmc 0 $kernel_addr_r Image-4.20-rc3
** Unrecognized filesystem type **
A quick workaround is to explicitly read the partition table, but this is still a regression, as it breaks existing scripts and workflows:
==========
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type 1 8192 30873600 00000000-01 0c
=> fatls mmc 0
852304 xen
23544320 Image-4.20-rc3
2 file(s), 0 dir(s)
==========
These two patches are the minimal version to fix this problem, by bringing the implicit part_init() call back just for non-DM MMC drivers. Patch 1 is needed to keep the H6 SPL below the size limit.
The whole SPL_LIBDISK_SUPPORT symbol is now somewhat obsolete and needs some proper fixing, but this needs more discussion and testing and is probably nothing for this release still.
Thanks,
Andre.
Andre Przywara (2):
sunxi: drop default SPL_LIBDISK_SUPPORT enablement
mmc: bring back partition init for non-DM MMC drivers
arch/arm/Kconfig | 1 - drivers/mmc/mmc.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.14.5
PATCH 1/2 sunxi: drop default SPL_LIBDISK_SUPPORT enablement
There is no code for using partition labels in the Allwinner SPL port. Even so the name is slightly misleading, CONFIG_SPL_LIBDISK_SUPPORT was meant to guard partition code for the SPL.
Remove the "imply" line in the Kconfig to make this obvious and avoid unneeded code inclusions, helping to keep the H6 SPL code small.
--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/Kconfig +0 -1
@@ -874,7 +874,6 @@ config ARCH_SUNXI imply PRE_CONSOLE_BUFFER imply SPL_GPIO_SUPPORT imply SPL_LIBCOMMON_SUPPORT - imply SPL_LIBDISK_SUPPORT imply SPL_LIBGENERIC_SUPPORT imply SPL_MMC_SUPPORT if MMC imply SPL_POWER_SUPPORT
Signature · 1 line
2.14.5
PATCH 1/2 sunxi: drop default SPL_LIBDISK_SUPPORT enablement
Quoted 5 lines · Andre Przywara
There is no code for using partition labels in the Allwinner SPL port. Even so the name is slightly misleading,
CONFIG_SPL_LIBDISK_SUPPORTwas meant to guard partition code for the SPL.
Quoted 7 lines
Remove the "imply" line in the
Kconfigto make this obvious and avoid unneeded code inclusions, helping to keep the H6 SPL code small.Signed-off-by Andre Przywara <[email protected]>--- arch/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
PATCH 1/2 sunxi: drop default SPL_LIBDISK_SUPPORT enablement
In reply to Andre PrzywaraQuoted 9 lines · Andre Przywara
There is no code for using partition labels in the Allwinner SPL port. Even so the name is slightly misleading,
CONFIG_SPL_LIBDISK_SUPPORTwas meant to guard partition code for the SPL.Remove the "imply" line in the
Kconfigto make this obvious and avoid unneeded code inclusions, helping to keep the H6 SPL code small.Signed-off-by Andre Przywara <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190109/33387f79/attachment.sig>
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
In reply to Andre PrzywaraCommit d0851c893706 ("blk: Call part_init() in the post_probe() method") removed the call to part_init() in mmc.c, as this is done by the DM_MMC framework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.
Bring the call back just for non-DM MMC driver to fix this regression.
--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/mmc.c +4 -0
@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc) bdesc->revision[0 ] =0 ;#endif +#if !defined(CONFIG_DM_MMC ) && (!defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBDISK_SUPPORT )) +part_init (bdesc); +#endif +return 0 ; }
Signature · 1 line
2.14.5
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
Quoted 8 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.
Quoted 6 lines
Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
Quoted 8 lines · Simon Glass
Quoted 7 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.
Quoted 7 lines
Quoted 6 lines
Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)Reviewed-by Simon Glass <[email protected]>
This also fixes MMC support on a tbs2910 board.
Thanks,
Soeren
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
Soeren Moch <[email protected]> [2019-01-05 18:31:09]:
Quoted 1 line
This also fixes MMC support on a tbs2910 board.
And also for Apalis board with i.MX6[1]. Thanks Andre!
1. https://lists.denx.de/pipermail/u-boot/2018-December/352210.html
-- ynezz
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
In reply to Andre PrzywaraQuoted 21 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>Reviewed-by Simon Glass <[email protected]>Tested-by Soeren Moch <[email protected]>--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/mmc.c +0
-0
drivers/mmc/mmc.c static int mmc_startup(struct mmc *mmc) · line 2457
Quoted 9 lines
drivers/mmc/mmc.c +4
-0@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc) bdesc->revision[0 ] =0 ;#endif +#if !defined(CONFIG_DM_MMC ) && (!defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBDISK_SUPPORT )) +part_init (bdesc); +#endif +return 0 ; }
So, this pushes pine_h64 over the limit:
https://travis-ci.org/trini/u-boot/jobs/477078336
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190108/cef95939/attachment.sig>
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
Quoted 26 lines · Tom Rini
Quoted 24 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>Reviewed-by Simon Glass <[email protected]>Tested-by Soeren Moch <[email protected]>--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/mmc.c +0
-0@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc) bdesc->revision[0 ] =0 ;#endif
Quoted 9 lines
drivers/mmc/mmc.c static int mmc_startup(struct mmc *mmc) · line 2457
Quoted 6 lines
drivers/mmc/mmc.c +4
-0+#if !defined(CONFIG_DM_MMC ) && (!defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBDISK_SUPPORT )) +part_init (bdesc); +#endif +return 0 ; }So, this pushes
pine_h64over the limit:
https://travis-ci.org/trini/u-boot/jobs/477078336
It seems you are missing patch 1/2?
https://lists.denx.de/pipermail/u-boot/2018-December/352283.html
(sunxi: drop default SPL_LIBDISK_SUPPORT enablement)
I put this one in for exactly this reason.
I have some other cleanups which reduce the H6 SPL size by 2K, will send them out shortly.
Cheers,
Andre.
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
Quoted 37 lines · André Przywara
Quoted 26 lines · Tom Rini
Quoted 24 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>Reviewed-by Simon Glass <[email protected]>Tested-by Soeren Moch <[email protected]>--- drivers/mmc/mmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/mmc.c +0
-0@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc) bdesc->revision[0 ] =0 ;#endif Quoted 9 lines
drivers/mmc/mmc.c static int mmc_startup(struct mmc *mmc) · line 2457
Quoted 6 lines
drivers/mmc/mmc.c +4
-0+#if !defined(CONFIG_DM_MMC ) && (!defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBDISK_SUPPORT )) +part_init (bdesc); +#endif +return 0 ; }So, this pushes
pine_h64over the limit:
https://travis-ci.org/trini/u-boot/jobs/477078336
Quoted 8 lines
It seems you are missing patch 1/2?
https://lists.denx.de/pipermail/u-boot/2018-December/352283.html
(sunxi: drop defaultSPL_LIBDISK_SUPPORTenablement)I put this one in for exactly this reason.
I have some other cleanups which reduce the H6 SPL size by 2K, will send them out shortly.
Thanks, I don't know why I thought that was in already.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190109/6c858c62/attachment.sig>
PATCH 2/2 mmc: bring back partition init for non-DM MMC drivers
In reply to Andre PrzywaraQuoted 7 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") removed the call topart_init()inmmc.c, as this is done by theDM_MMCframework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are now missing the implicit partition init, leading to failing MMC accesses due to the missing partition information.
Quoted 5 lines
Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by Andre Przywara <[email protected]>Reviewed-by Simon Glass <[email protected]>Tested-by Soeren Moch <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190109/b56b140d/attachment.sig>
cover mmc: Fix partition table init regression
In reply to Andre PrzywaraQuoted 26 lines · Andre Przywara
Commit
d0851c893706("blk: Callpart_init()in thepost_probe()method") in the 2019.01-rc1 merge window moved the partition init call to the generic DM layer, leaving every non-DM driver behind. As the result all Allwinner boards now don't read the partition table automatically anymore:
=> fatls mmc 0
** Unrecognized filesystem type **
=> fatload mmc 0 $kernel_addr_r Image-4.20-rc3
** Unrecognized filesystem type **A quick workaround is to explicitly read the partition table, but this is still a regression, as it breaks existing scripts and workflows:
==========
=> mmc partPartition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type 1 8192 30873600 00000000-01 0c=> fatls mmc 0
852304 xen
23544320 Image-4.20-rc32 file(s), 0 dir(s)
==========
Quoted 7 lines
These two patches are the minimal version to fix this problem, by bringing the implicit
part_init()call back just for non-DM MMC drivers. Patch 1 is needed to keep the H6 SPL below the size limit.The whole
SPL_LIBDISK_SUPPORTsymbol is now somewhat obsolete and needs some proper fixing, but this needs more discussion and testing and is probably nothing for this release still.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181217/fd92fdb6/attachment.sig>