diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2018-11-02 19:51:06 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-16 16:51:59 -0500 |
commit | 59ebf4afa6ba3edc7012e3ac23aae607b0b54dbd (patch) | |
tree | c31429074e65207448779ee0c0e1a10ff8a46fe8 /arch/arm | |
parent | a3501a4a44b8cf52d31d9ab93e0f89fd85a3f7a7 (diff) |
armv7R: K3: am654: Add support for triggering ddr init from SPL
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().
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-k3/am6_init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c index fef0107505..e2fe00c422 100644 --- a/arch/arm/mach-k3/am6_init.c +++ b/arch/arm/mach-k3/am6_init.c @@ -11,6 +11,7 @@ #include <spl.h> #include <asm/arch/hardware.h> #include "common.h" +#include <dm.h> #ifdef CONFIG_SPL_BUILD static void mmr_unlock(u32 base, u32 partition) @@ -57,6 +58,10 @@ static void store_boot_index_from_rom(void) void board_init_f(ulong dummy) { +#if defined(CONFIG_K3_AM654_DDRSS) + struct udevice *dev; + int ret; +#endif /* * Cannot delay this further as there is a chance that * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section. @@ -75,6 +80,14 @@ void board_init_f(ulong dummy) /* Prepare console output */ preloader_console_init(); + +#ifdef CONFIG_K3_AM654_DDRSS + ret = uclass_get_device(UCLASS_RAM, 0, &dev); + if (ret) { + printf("DRAM init failed: %d\n", ret); + return; + } +#endif } u32 spl_boot_mode(const u32 boot_device) |