Compared with Yocto 1.7, Yocto 1.8 will execute the additional function,spl_dram_init(), in board_init_f() of /u-boot-imx/board/freescale/mx6sabresd/mx6sabresd.c.
My questions are
1. What is the purpose of spl_dram_init()?
2. Are there side-effects of skipped doing spl_dram_init()?
Best Regards,
Rayn
There are two ways to configure your DDR settings.
The first (oldest) way of doing things is to use the flash header, as shown in this .cfg file:
git.denx.de Git - u-boot.git/blob - board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg
The second, which is only available if you use SPL (which executes from on-chip RAM) is to use spl_dram_init() to configure your memory programmatically before loading a full version of U-Boot or kernel image (falcon mode) into DDR.
You can use "git grep spl_dram_init" from within the U-Boot source tree to find a bunch of examples of how that's done, but in general, you fill in "struct mx6_ddr_sysinfo" to define your memory configuration and "struct mx6_mmdc_calibration" to contain your calibration values.
Hi All,
I have using SPL in Yocto 1.8, and it also boots successfully when I skip doing spl_dram_init()
I think that the DDR has be initialed by hard code as flash_header.S before doing spl_dram_init()
spl_dram_init() will change my DDR parameter setting,
these values are different from flash_header.S
So, is the spl_dram_init() necessary for SPL ?
Best Regards,
Rayn
SPL (Secondary Program Loader) is small loader, which has code to initialize the such as DDR.
The spl_dram_init() is used for initialize the dram, most of them are DDR.
It is mandatory for SPL.
But so far, in the i.MX6 BSP, it doesn't use the SPL.
The DDR inialization is in DCD.
Hi Rayn
1. it is used by spl framework (if enabled), description can be found
in uboot documentation /doc/README.SPL and for example of spl usage
one can look at powerpc application note
http://www.nxp.com/files/32bit/doc/app_note/AN3201.pdf
2. no
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------