Skip to content
Commit a335f805 authored by Peng Fan's avatar Peng Fan
Browse files

spl: spl_mmc: fix getting raw_sect when boot from emmc boot partition



On i.MX8, when booting from eMMC boot partition, the whole flash.bin
is stored in boot partition, however SPL switches to user partition
during the init of mmc driver:
  spl_mmc_load() -> mmc_init()

Then it tries to load the container image in
spl_mmc_get_uboot_raw_sector(), but here it reads the data from user
partition and the header is not recognized as a valid header.

So we move spl_mmc_get_uboot_raw_sector after eMMC partition switch
to address this issue.

Anyway put spl_mmc_get_uboot_raw_sector before eMMC partition switch
is not correct, so let's move it after eMMC partition switch.

Reported-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 5d336d17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment