diff options
author | Devarsh Thakkar <devarsht@ti.com> | 2024-01-24 20:33:46 +0530 |
---|---|---|
committer | Francesco Dolcini <francesco.dolcini@toradex.com> | 2024-03-21 14:26:33 +0000 |
commit | dcbae7772d563cf7bfc1c7b8ed5eb32e5af5c86e (patch) | |
tree | 0f2a07769204e9fc78adbb02f9880838f82a1f5a /board | |
parent | b242b6a9ef8c49e4739729fe5f5339b6d0b4bf01 (diff) |
board: ti: am62p: Add splash screen support
Add MMC and OSPI NOR flash as storage locations for splash screen Enable
video memory reservation and splash display by calling board specific
routine for splash screen.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/am62px/evm.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c index 60b5606dea..23716ed99a 100644 --- a/board/ti/am62px/evm.c +++ b/board/ti/am62px/evm.c @@ -13,9 +13,34 @@ #include <env.h> #include <fdt_support.h> #include <spl.h> +#include <video.h> +#include <splash.h> #include "../common/rtc.c" +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) +static struct splash_location default_splash_locations[] = { + { + .name = "sf", + .storage = SPLASH_STORAGE_SF, + .flags = SPLASH_STORAGE_RAW, + .offset = 0x700000, + }, + { + .name = "mmc", + .storage = SPLASH_STORAGE_MMC, + .flags = SPLASH_STORAGE_FS, + .devpart = "1:1", + }, +}; + +int splash_screen_prepare(void) +{ + return splash_source_load(default_splash_locations, + ARRAY_SIZE(default_splash_locations)); +} +#endif + int board_init(void) { if (IS_ENABLED(CONFIG_BOARD_HAS_32K_RTC_CRYSTAL)) @@ -33,3 +58,31 @@ int dram_init_banksize(void) { return fdtdec_setup_memory_banksize(); } + +#if defined(CONFIG_SPL_BUILD) +static int video_setup(void) +{ + if (CONFIG_IS_ENABLED(VIDEO)) { + 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; +} + +void spl_board_init(void) +{ + video_setup(); + enable_caches(); + if (IS_ENABLED(CONFIG_SPL_SPLASH_SCREEN) && IS_ENABLED(CONFIG_SPL_BMP)) + splash_display(); +} +#endif |