mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-01 07:31:52 +01:00
imx8ulp_evk: Clear data at fdt_addr_r before booting kernel
When using dual boot mode, the DDR won't be reset when APD power off or reboot. It has possibility that obsolete fdt data existing on fdt_addr_r address. Then even nothing in EFI partitions, the distro boot still continue to parse fdt and get uboot crashed. Clear the data at fdt_addr_r, so the fdt header check in above case will not pass. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
9b7e39b6c1
commit
4dfb2196cd
@ -121,8 +121,16 @@ int board_early_init_f(void)
|
|||||||
|
|
||||||
int board_late_init(void)
|
int board_late_init(void)
|
||||||
{
|
{
|
||||||
|
ulong addr;
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC)
|
#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC)
|
||||||
board_late_mmc_env_init();
|
board_late_mmc_env_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* clear fdtaddr to avoid obsolete data */
|
||||||
|
addr = env_get_hex("fdt_addr_r", 0);
|
||||||
|
if (addr)
|
||||||
|
memset((void *)addr, 0, 0x400);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user