[PATCH 8/9] board: ti: am62x: evm: Add splash screen support

Nikhil M Jain n-jain1 at ti.com
Fri Jan 13 09:29:26 CET 2023


Splash screen function needs splash source information
to load image and display it, splash_location provides
the necessary info, Set default_splash_location to MMC
1st partition. Probe TIDSS for splash screen display.

Signed-off-by: Nikhil M Jain <n-jain1 at ti.com>
---
 board/ti/am62x/evm.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
index d65ee1d696..87d7ebc578 100644
--- a/board/ti/am62x/evm.c
+++ b/board/ti/am62x/evm.c
@@ -10,6 +10,8 @@
 #include <asm/io.h>
 #include <spl.h>
 #include <dm/uclass.h>
+#include <video.h>
+#include <splash.h>
 #include <k3-ddrss.h>
 #include <fdt_support.h>
 #include <asm/arch/hardware.h>
@@ -18,8 +20,33 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SPLASH_SCREEN
+	static struct splash_location default_splash_locations[] = {
+		{
+			.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_VIDEO_TIDSS)) {
+		int ret;
+		struct udevice *dev;
+
+		ret = uclass_get_device_by_name(UCLASS_VIDEO, "dss at 30200000", &dev);
+		if (ret)
+			panic("Cannot get DSS device: %d\n", ret);
+	}
 	return 0;
 }
 
-- 
2.17.1



More information about the U-Boot mailing list