spl: mmc: make eMMC HW boot partition configuration optional
PATCH 1/1 spl: mmc: make eMMC HW boot partition configuration optional
Loading U-Boot on i.MX8QXP MEK board is broken since recent changes in spl_mmc:
U-Boot SPL 2019.10-00162-gff5bd397e4 (Oct 18 2019 - 15:50:45 +0200) Normal Boot
WDT: Not found!
Trying to boot from MMC2_2
Load image from MMC/SD 0x46400
spl: mmc partition switch failed
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
The newly added CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION option is selected automatically and overrides the EXT_CSC_PART_CONFIG configurations with default value, always selecting the eMMC boot partition 1. Boards which place U-Boot image in other partitions became not bootable.
Fix this by making the eMMC HW boot partition selection optional.
---
Hi Tom,
Many other boards (using CONFIG_SUPPORT_EMMC_BOOT) are affected, too. So, this (or other suitable fix) should be applied ASAP.
Thanks,
Anatolij
common/spl/Kconfig | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
common/spl/Kconfig +22 -6
@@ -325,12 +325,6 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR Address on the MMC to load U-Boot from, when the MMC is being used in raw mode. Units: MMC sectors (1 sector = 512 bytes). -config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION - int "Number of the eMMC boot partition to use" - default 1 - help - eMMC boot partition number to use when the eMMC in raw mode. - config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION bool "MMC Raw mode: by partition" help
@@ -359,6 +353,28 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE Partition Type on the MMC to load U-Boot from, when the MMC is being used in raw mode. +config SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG + bool "Override eMMC EXT_CSC_PART_CONFIG by user defined partition" + depends on SUPPORT_EMMC_BOOT + help + eMMC boot partition is normally configured by the bits of the EXT_CSD + register (EXT_CSC_PART_CONFIG), BOOT_PARTITION_ENABLE field. In some + cases it might be required in SPL to load the image from different + partition than the partition selected by EXT_CSC_PART_CONFIG register. + Enable this option if you intend to use an eMMC boot partition other + then selected via EXT_CSC_PART_CONFIG register and specify the custom + partition number by the CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION + option. + +config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION + int "Number of the eMMC boot partition to use" + depends on SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG + default 1 + help + eMMC boot partition number to use when the eMMC in raw mode and + the eMMC EXT_CSC_PART_CONFIG selection should be overridden in SPL + by user defined partition number. + config SPL_CRC32_SUPPORT bool "Support CRC32" default y if SPL_LEGACY_IMAGE_SUPPORT
Signature · 1 line
2.17.1
PATCH 1/1 spl: mmc: make eMMC HW boot partition configuration optional
Hi Anatolij,
Quoted 20 lines
Loading U-Boot on i.MX8QXP MEK board is broken since recent changes in
spl_mmc:U-Boot SPL 2019.10-00162-gff5bd397e4 (Oct 18 2019 - 15:50:45 +0200) Normal Boot
WDT: Not found!
Trying to boot fromMMC2_2
Load image from MMC/SD0x46400
spl: mmc partition switch failed
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###The newly added
CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITIONoption is selected automatically and overrides theEXT_CSC_PART_CONFIGconfigurations with default value, always selecting the eMMC boot partition 1. Boards which place U-Boot image in other partitions became not bootable.Fix this by making the eMMC HW boot partition selection optional.
Quoted 7 lines
Fixes 17241ea0543a (spl: mmc: Add option to set eMMC HW bootpartition) Signed-off-by: Anatolij Gustschin <[email protected]>
---
Hi Tom,Many other boards (using
CONFIG_SUPPORT_EMMC_BOOT) are affected, too. So, this (or other suitable fix) should be applied ASAP.
Sorry for the regression. Indeed, there shall be an Kconfig option to enable support for this feature.
Thanks Anatolij for preparing the fix.
Quoted 58 lines
Thanks,
Anatolijcommon/spl/Kconfig | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)common/spl/Kconfig +0
-0@@ -325,12 +325,6 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR Address on the MMC to load U-Boot from, when the MMC isbeing used in raw mode. Units: MMC sectors (1 sector = 512 bytes).
common/spl/Kconfig +0
-5-config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION - int "Number of the eMMC boot partition to use" - default 1 - help - eMMC boot partition number to use when the eMMC in rawmode. -
configSYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITIONcommon/spl/Kconfig +0
-0bool "MMC Raw mode: by partition" help@@ -359,6 +353,28 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE Partition Type on the MMC to load U-Boot from, when theMMC is being used in raw mode.
common/spl/Kconfig +2
-0+config SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG + bool "Override eMMC EXT_CSC_PART_CONFIG by user definedpartition"
common/spl/Kconfig +3
-0+ depends on SUPPORT_EMMC_BOOT + help + eMMC boot partition is normally configured by the bits ofthe
EXT_CSDcommon/spl/Kconfig +1
-0+ register (EXT_CSC_PART_CONFIG), BOOT_PARTITION_ENABLEfield. In some
common/spl/Kconfig +1
-0+ cases it might be required in SPL to load the image fromdifferent
common/spl/Kconfig +1
-0+ partition than the partition selected by
EXT_CSC_PART_CONFIGregister.common/spl/Kconfig +1
-0+ Enable this option if you intend to use an eMMC bootpartition other
common/spl/Kconfig +1
-0+ then selected via EXT_CSC_PART_CONFIG register and specifythe custom
common/spl/Kconfig +1
-0+ partition number by the
CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITIONcommon/spl/Kconfig +8
-0+ option. + +config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION + int "Number of the eMMC boot partition to use" + depends on SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG + default 1 + help + eMMC boot partition number to use when the eMMC in rawmode and
common/spl/Kconfig +1
-0+ the eMMC EXT_CSC_PART_CONFIG selection should beoverridden in SPL
common/spl/Kconfig config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE · line 380
Quoted 5 lines
common/spl/Kconfig +2
-0+ by user defined partition number. + config SPL_CRC32_SUPPORT bool "Support CRC32" default y if SPL_LEGACY_IMAGE_SUPPORT
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191018/96980b12/attachment.sig>
PATCH 1/1 spl: mmc: make eMMC HW boot partition configuration optional
In reply to Anatolij GustschinQuoted 18 lines · Anatolij Gustschin
Loading U-Boot on i.MX8QXP MEK board is broken since recent changes in
spl_mmc:U-Boot SPL 2019.10-00162-gff5bd397e4 (Oct 18 2019 - 15:50:45 +0200) Normal Boot
WDT: Not found!
Trying to boot fromMMC2_2
Load image from MMC/SD0x46400
spl: mmc partition switch failed
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###The newly added
CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITIONoption is selected automatically and overrides theEXT_CSC_PART_CONFIGconfigurations with default value, always selecting the eMMC boot partition 1. Boards which place U-Boot image in other partitions became not bootable.
Quoted 5 lines
Fix this by making the eMMC HW boot partition selection optional.
Fixes 17241ea0543a (spl: mmc: Add option to set eMMC HW boot partition)Reviewed-by Lukasz Majewski <[email protected]>Signed-off-by Anatolij Gustschin <[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: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191019/69fbb71c/attachment.sig>