This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2HG: Earlyboot:mmc load_firmware failed

Part Number: TDA2HG

Hi,

My software version: visionSDK3.08.

I used earlyboot to reduce uboot startup time. 

It works fine on sdcard, but it does not work when download to EMMC.

Boot log:

U-Boot SPL 2019.01 (Aug 28 2020 - 15:12:31 +0800)
DRA752-GP ES2.0
no pinctrl state for default mode
Card did not respond to voltage select!
Firmware loading failed
Card did not respond to voltage select!
Firmware loading failed
Card did not respond to voltage select!
Firmware loading failed
Card did not respond to voltage select!
Firmware loading failed
Trying to boot from MMC2_2
uclass_find_device ret = 0
uclass_get_device_tail ret = 0
spl: mmc boot mode: fs
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Looks like mmc failed to initialize.

Is there any problem with mmc initialization timing?

  • Hi,

    Can I know the all steps you followed for the EMMC boot? 

    Thanks

    Gaviraju

  • Hi,

    I started with an SD card, and then used a script to download the targetfs to EMMC.

    It can work normally before using earlyboot.

    I checked the code yesterday and found that mmc1 was specified in dts. I made the following modifications and it works normally.

    diff --git a/ti_components/os_tools/linux/u-boot/u-boot/arch/arm/dts/dra7-ipu-common-early-boot.dtsi b/ti_components/os_tools/linux/u-boot/u-boot/arch/arm/dts/dra7-ipu-common-early-boot.dtsi
    index 4a9c2e1..66eb0fe 100644
    --- a/ti_components/os_tools/linux/u-boot/u-boot/arch/arm/dts/dra7-ipu-common-early-boot.dtsi
    +++ b/ti_components/os_tools/linux/u-boot/u-boot/arch/arm/dts/dra7-ipu-common-early-boot.dtsi
    @@ -6,6 +6,7 @@
     / {
     	chosen {
     		firmware-loader = &fs_loader0;
    +		firmware-loader-emmc = &fs_loader1;
     	};
     
     	fs_loader0: fs_loader@0 {
    @@ -13,6 +14,12 @@
     		compatible = "u-boot,fs-loader";
     		phandlepart = <&mmc1 1>;
     	};
    +
    +	fs_loader1: fs_loader@1 {
    +		u-boot,dm-pre-reloc;
    +		compatible = "u-boot,fs-loader";
    +		phandlepart = <&mmc2 1>;
    +	};
     };
     
     &timer3 {
    diff --git a/ti_components/os_tools/linux/u-boot/u-boot/drivers/misc/fs_loader.c b/ti_components/os_tools/linux/u-boot/u-boot/drivers/misc/fs_loader.c
    index 479fd54..e11efbc 100755
    --- a/ti_components/os_tools/linux/u-boot/u-boot/drivers/misc/fs_loader.c
    +++ b/ti_components/os_tools/linux/u-boot/u-boot/drivers/misc/fs_loader.c
    @@ -13,6 +13,8 @@
     #include <mapmem.h>
     #include <malloc.h>
     #include <spl.h>
    +#include <asm/omap_common.h>
    +#include <asm/arch/omap.h>
     
     DECLARE_GLOBAL_DATA_PTR;
     
    @@ -301,8 +303,22 @@ static int fs_loader_ofdata_to_platdata(struct udevice *dev)
     {
     	const char *fs_loader_path;
     	u32 phandlepart[2];
    -
    -	fs_loader_path = ofnode_get_chosen_prop("firmware-loader");
    +	u32 boot_device;
    +	u32 boot_params = *((u32 *)OMAP_SRAM_SCRATCH_BOOT_PARAMS);
    +	struct omap_boot_parameters *omap_boot_params;
    +
    +	omap_boot_params = (struct omap_boot_parameters *)boot_params;
    +	boot_device = omap_boot_params->boot_device;
    +
    +	switch (boot_device) {
    +	case BOOT_DEVICE_MMC1:
    +		fs_loader_path = ofnode_get_chosen_prop("firmware-loader");
    +		break;
    +	case BOOT_DEVICE_MMC2:
    +	case BOOT_DEVICE_MMC2_2:
    +		fs_loader_path = ofnode_get_chosen_prop("firmware-loader-emmc");
    +		break;
    +	}
     
     	if (fs_loader_path) {
     		ofnode fs_loader_node;