[U-Boot] [PATCH] board/freescale: Fix for not loading MC firmware correctly

Pankaj Bansal pankaj.bansal at nxp.com
Sat Mar 9 07:35:39 UTC 2019


Issue: during SD boot, following error comes:
  MMC read: dev # 0, block # 20480, count 2048 ... 2048 blocks read: OK

  MMC read: dev # 0, block # 28672, count 2048 ... 2048 blocks read: OK
  fsl-mc: ERR: Bad firmware image (bad FIT header)
  Hit any key to stop autoboot:  0

Cause: mc 10.14.3 file size is 1064880, the value is 0x820 blocks which
is more than 0x800. The default DPC loading address 0x80100000 has overlap
with MC loading address 0x80000000, since the size of MC is over 1MB.

Fix: update the MC and dpc address as per their addresses in XSPI flash.
i.e. in xspi flash MC address is 0x20a00000 so corresponding address in
dram when loading MC firmware from mmc is 0x80a00000. similarly dpc is @
0x20e00000 in xspi flash and 0x80e00000 in dram when loaded from mmc.

This same approach is being followed in other cases also in same file,
e.g. esbc_validate 0x80740000 <=> esbc_validate 0x20740000

On same lines modify the address of dpl to 0x80d00000

Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
---
 include/configs/lx2160a_common.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 17cfd7bfd7..40ef364c22 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -217,14 +217,14 @@ int select_i2c_ch_pca9547_sec(unsigned char ch);
 	"fsl_mc start mc 0x20a00000 0x20e00000\0"
 
 #define SD_MC_INIT_CMD				\
-	"mmc read 0x80000000 0x5000 0x800;"	\
-	"mmc read 0x80100000 0x7000 0x800;"	\
+	"mmc read 0x80a00000 0x5000 0x1800;"	\
+	"mmc read 0x80e00000 0x7000 0x800;"	\
 	"env exists secureboot && "		\
 	"mmc read 0x80700000 0x3800 0x10 && "	\
 	"mmc read 0x80740000 0x3A00 0x10 && "	\
 	"esbc_validate 0x80700000 && "		\
 	"esbc_validate 0x80740000 ;"		\
-	"fsl_mc start mc 0x80000000 0x80100000\0"
+	"fsl_mc start mc 0x80a00000 0x80e00000\0"
 
 #define EXTRA_ENV_SETTINGS			\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
@@ -289,11 +289,11 @@ int select_i2c_ch_pca9547_sec(unsigned char ch);
 
 #define SD_BOOTCOMMAND						\
 		"env exists mcinitcmd && mmcinfo; "		\
-		"mmc read 0x80001000 0x6800 0x800; "		\
+		"mmc read 0x80d00000 0x6800 0x800; "		\
 		"env exists mcinitcmd && env exists secureboot "	\
 		" && mmc read 0x80780000 0x3C00 0x10 "		\
 		"&& esbc_validate 0x80780000;env exists mcinitcmd "	\
-		"&& fsl_mc lazyapply dpl 0x80001000;"		\
+		"&& fsl_mc lazyapply dpl 0x80d00000;"		\
 		"run distro_bootcmd;run sd_bootcmd;"		\
 		"env exists secureboot && esbc_halt;"
 
-- 
2.17.1



More information about the U-Boot mailing list