Tool/software: Linux
Hello,
I have started working on DDR configuration for our new custom board based on AM5728 Sotara processor, we have taken Am57xx EVM as starting reference and using "PROCESSOR-SDK-LINUX-AM57X 02_00_02_11" .
Before working on our custom design i want to explore the configuration and flow of SDRAM init , i am referring one old post which mention the details what are the changes we need for U-boot code.
https://e2e.ti.com/support/arm/sitara_arm/f/791/t/464238
My doubt is, In void sdram_init(void) function code is return because "omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL" , how can i change this i didn't understood the Configuration head concept.
As I would like to exlopre the DDR configuration with Existing EVM how i can go ahead, please provide me the pointer . how other configuration in take place like MMU configuration and AC timing setting.
Please find the below code snippet:
/* * SDRAM initialization: * SDRAM initialization has two parts: * 1. Configuring the SDRAM device * 2. Update the AC timings related parameters in the EMIF module * (1) should be done only once and should not be done while we are * running from SDRAM. * (2) can and should be done more than once if OPP changes. * Particularly, this may be needed when we boot without SPL and * and using Configuration Header(CH). ROM code supports only at 50% OPP * at boot (low power boot). So u-boot has to switch to OPP100 and update * the frequency. So, * Doing (1) and (2) makes sense - first time initialization * Doing (2) and not (1) makes sense - OPP change (when using CH) * Doing (1) and not (2) doen't make sense * See do_sdram_init() for the details */ void sdram_init(void) { u32 in_sdram, size_prog, size_detect; struct emif_reg_struct *emif = (struct emif_reg_struct *)EMIF1_BASE; u32 sdram_type = emif_sdram_type(emif->emif_sdram_config); debug(">>sdram_init()\n"); printf(">>sdram_init()\n"); if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL) { printf("+++++++++++>>sdram_init() Omap_hw_init = %d \n ",omap_hw_init_context()); return; } in_sdram = running_from_sdram(); debug("in_sdram = %d\n", in_sdram);
Thanks
Mishra80