board/fsl/lx2160a: Fix MC firmware loading during SD boot
PATCH v6 1/1 board/fsl/lx2160a: Fix MC firmware loading during SD boot
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
it's occurring MC firmware and DPC are copied from SD card to DDR. Size reserved between MC and DPC firmware on DDR is 1MB. if the size of MC firmware(load address 0x80000000) is more than 1 MB then part of MC firmware will be overwritten by DPC firmware (load address 0x80100000).
so, Update the MC/DPL/DPC firmware's DDR address as per their respective addresses in SD card.
---
Notes:
V6:
- Modify the commit message to remove SD card firmware layout V5:
- Add 2019 in Copyright year
V4:
- Modify the commit message to remove any reference to Flexspi flash V3:
- modify the commit message.
- remove issue/cause/fix from message.
V2:
- reduce the mc firmware size blocks from 0x1800 to 0x1200, to save on boot time
- Fix the commit message to indicate that the patch is for LX2160A boards only and for SD boot only
include/configs/lx2160a_common.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
include/configs/lx2160a_common.h +6 -6
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* -* Copyright 2018 NXP +* Copyright 2018-2019 NXP */ #ifndef __LX2_COMMON_H
@@ -199,14 +199,14 @@ unsigned long get_board_ddr_clk(void); "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 0x1200;" \ + "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" \
@@ -265,11 +265,11 @@ unsigned long get_board_ddr_clk(void);#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;"
Signature · 1 line
2.17.1
A message that is not in the archive (sent off-list or not yet received): VI1PR0402MB3854DEF57EE1DD1E6C02D60F978C0@VI1PR0402MB3854.eurprd04.prod.outlook.com
PATCH v6 1/1 board/fsl/lx2160a: Fix MC firmware loading during SD boot
Quoted 20 lines
From: Pankaj Bansal
Sent: Wednesday, July 17, 2019 4:04 PM
To: Prabhakar Kushwaha <[email protected]>; Meenakshi Aggarwal <[email protected]>
Cc: Varun Sethi <[email protected]>; u-boot at lists.denx.de
Subject: [PATCH v6] board/fsl/lx2160a: Fix MC firmware loading during SD bootduring SD boot, following error comes:
MMC read: dev # 0, block # 20480, count 2048 ... 2048 blocks read: OKMMC 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: 0it's occurring MC firmware and DPC are copied from SD card to DDR. Size reserved between MC and DPC firmware on DDR is 1MB.
if the size of MC firmware(load address0x80000000) is more than 1 MB then part of MC firmware will be overwritten by DPC firmware (load address0x80100000).
Quoted 4 lines
so, Update the MC/DPL/DPC firmware's DDR address as per their respective addresses in SD card.
Signed-off-by Pankaj Bansal <[email protected]>
Slight updates in subject and description
Applied to fsl-qoriq master, awaiting upstream.
Thanks
priyankajain