[PATCH V3 04/10] board: ti: am62x: evm: Add necessary functions to call splash screen
Nikhil M Jain
n-jain1 at ti.com
Tue May 9 12:31:40 CEST 2023
To enable splash screen at SPL, call methods to reserve memory for video
and enable cache, and splash_display to display bmp image.
Signed-off-by: Nikhil M Jain <n-jain1 at ti.com>
---
V3:
- Remove function call for dram setup and set pagetable.
- Call splash display only if SPLASH_SCREEN is defined.
V2:
- No change.
board/ti/am62x/evm.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
index 1b7b439cf5..22967bb1bc 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>
@@ -59,6 +60,35 @@ int dram_init_banksize(void)
}
#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)
+{
+ if (CONFIG_IS_ENABLED(VIDEO)) {
+ video_setup();
+ enable_caches();
+ if (CONFIG_IS_ENABLED(SPLASH_SCREEN))
+ splash_display();
+ }
+}
+
#if defined(CONFIG_K3_AM64_DDRSS)
static void fixup_ddr_driver_for_ecc(struct spl_image_info *spl_image)
{
--
2.34.1
More information about the U-Boot
mailing list