U-boot (lsdk1812) spl does not load from mmc on ls1021atwr

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

U-boot (lsdk1812) spl does not load from mmc on ls1021atwr

1,893 次查看
dusanferbas
Contributor III

We have a custom board with LS1020A and running u-boot built with Yocto 2016.

We are trying to use LSDK 1812, u-boot boots from SD card, when compiled with default ls1021atwr settings. When we try to modify these settings to match our former Yocto settings, I know there are DM and Kconfig changes, we get a u-boot image, but it hangs during reading u-boot from mmc during SPL phase.

See attached log for details.

Does anyone experienced similar case?

标记 (3)
0 项奖励
回复
3 回复数

1,532 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dusan Ferbas,

Would you please  provide your modified source code used in LSDK 1812 u-boot?

Thanks,

Yiping

0 项奖励
回复

1,532 次查看
dusanferbas
Contributor III

Up to now, we did not modify any source code in the LSDK 1812, except symbol settings in the ls1021atwr.h and defconfig files. These files are in attached archives, where also assembler listings for startup files are placed. You can compare these archives, to check if startup files were differently compiled. Flexbuild fresh is just for a comparison, you can get it by compiling the LSDK 1812. Yocto to flexbuild is how we initially used our Yocto settings to modify the ls1021atwr.h from LSDK 1812.

-----------
Hopefully following is a same topic :-).
I wonder if u-boot is running on ls1021 with or without I/D caches enabled, because the SKIP_LOWLEVEL_INIT symbol is defined and in Yocto sdk 2.0x it was not. This symbol prevents of calling the cpu_init_cp15 (start.S).

I was looking for a commit in u-boot repositories, which changed this behavior, but I got confused, because in the SDK repository, the skip symbol was never defined, i.e. till 2017-01-23. On the contrary, in the Denx (mainline) repository, the symbol was defined just from the beginning. Both repositories started history of ls1021atwr.h on 2014-09-08.

0 项奖励
回复

1,532 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dusan Ferbas,

In your modified u-boot configuration file, memory address allocation( such as load addr, TEXT Base address) has been changed, I didn't find obvious conflict.

I compared your problem u-boot console log with the original flexbuild u-boot console log, it seems the SPL program failed inside function mmc_load_legacy in common/spl/spl_mmc.c, probably there is problem at the function "blk_dread" to read u-boot image from mmc to DDR. Please refer to the following source code.

static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc,
                           ulong sector, struct image_header *header)
{
        u32 image_size_sectors;
        unsigned long count;
        int ret;

        ret = spl_parse_image_header(spl_image, header);
        if (ret)
                return ret;

        /* convert size to sectors - round up */
        image_size_sectors = (spl_image->size + mmc->read_bl_len - 1) /
                             mmc->read_bl_len;

        /* Read the header too to avoid extra memcpy */
        count = blk_dread(mmc_get_blk_desc(mmc), sector, image_size_sectors,
                          (void *)(ulong)spl_image->load_addr);
        debug("read %x sectors to %lx\n", image_size_sectors,
              spl_image->load_addr);
        if (count != image_size_sectors)
                return -EIO;

        return 0;
}

So I suspect whether there is problem with your DDR controller configuration for DDR writing operation.

Please check whether DDR controller configuration registers setting in ls1021atwr.h in suitable for your custom board.


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复