diff options
author | Nikhil M Jain <n-jain1@ti.com> | 2023-04-10 14:19:12 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-08 09:26:12 -0400 |
commit | 72236302e67827a9d4aa251308d162a14f6ce2d6 (patch) | |
tree | aa66aee75707a70a59501c2bbe50446233adf25a /board/ti | |
parent | 852480c1f41d90cf0586f6ebf6037e95f107ce7d (diff) | |
download | u-boot-72236302e67827a9d4aa251308d162a14f6ce2d6.tar.gz |
board: ti: am62x: evm: Add necessary functions to call splash screen
To enable splash screen on AM62x at a53 SPL setup DRAM, set page table,
enable cache to allow copying of bmp image to frame buffer and display
it using splash_display.
Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Diffstat (limited to 'board/ti')
-rw-r--r-- | board/ti/am62x/evm.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index e00e42e276..34830f445f 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -9,6 +9,7 @@ #include <env.h> #include <spl.h> +#include <init.h> #include <video.h> #include <splash.h> #include <k3-ddrss.h> @@ -58,6 +59,44 @@ int dram_init_banksize(void) } #if defined(CONFIG_SPL_BUILD) +#ifdef CONFIG_SPL_VIDEO_TIDSS +static int setup_dram(void) +{ + dram_init(); + dram_init_banksize(); + gd->ram_base = CFG_SYS_SDRAM_BASE; + gd->ram_top = gd->ram_base + gd->ram_size; + gd->relocaddr = gd->ram_top; + return 0; +} + +static int video_setup(void) +{ + ulong addr; + int ret; + addr = gd->relocaddr; + + ret = video_reserve(&addr); + if (ret) + return ret; + debug("Reserving %luk for video at: %08lx\n", + ((unsigned long)gd->relocaddr - addr) >> 10, addr); + gd->relocaddr = addr; + return 0; +} + +#endif +void spl_board_init(void) +{ +#if defined(CONFIG_SPL_VIDEO_TIDSS) + setup_dram(); + arch_reserve_mmu(); + video_setup(); + enable_caches(); + splash_display(); +#endif +} + #if defined(CONFIG_K3_AM64_DDRSS) static void fixup_ddr_driver_for_ecc(struct spl_image_info *spl_image) { |