In SPL, DDR should be made available by the end of board_init_f()
so that apis in board_init_r() can use ddr. Adding support for
triggering DDR initialization from board_init_f().
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
void board_init_f(ulong dummy)
{
-#if defined(CONFIG_K3_LOAD_SYSFW)
+#if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW)
struct udevice *dev;
int ret;
#endif
/* Prepare console output */
preloader_console_init();
#endif
+
+#if defined(CONFIG_K3_J721E_DDRSS)
+ ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+ if (ret)
+ panic("DRAM init failed: %d\n", ret);
+#endif
}
u32 spl_boot_mode(const u32 boot_device)
select K3_LOAD_SYSFW
select RAM
select SPL_RAM
+ select K3_J721E_DDRSS
imply SYS_K3_SPL_ATF
endchoice