summaryrefslogtreecommitdiff
path: root/board/toradex
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-06-23 23:39:21 +0300
committerIgor Opaniuk <igor.opaniuk@toradex.com>2020-07-15 13:00:07 +0300
commitc1aff1e3cbde4c4152e4b64d09761b8bc246d4ff (patch)
treeb969f04b34dd3ad0029fb776b7f85befd79a52aa /board/toradex
parent350c45315df23f536d49a2c52d873d8b69f527ac (diff)
toradex: common: show boot logo
Add function for showing boot logo, embed into u-boot blob. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Diffstat (limited to 'board/toradex')
-rw-r--r--board/toradex/common/tdx-common.c26
-rw-r--r--board/toradex/common/tdx-common.h4
2 files changed, 30 insertions, 0 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index e8de923f3e1..9b6c8f95546 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -9,6 +9,13 @@
#include <init.h>
#include <linux/libfdt.h>
+#ifdef CONFIG_DM_VIDEO
+#include <bmp_logo.h>
+#include <dm.h>
+#include <splash.h>
+#include <video.h>
+#endif
+
#include "tdx-cfg-block.h"
#include <asm/setup.h>
#include "tdx-common.h"
@@ -168,3 +175,22 @@ int ft_common_board_setup(void *blob, bd_t *bd)
}
#endif /* CONFIG_TDX_CFG_BLOCK */
+
+#if defined(CONFIG_DM_VIDEO)
+int show_boot_logo(void)
+{
+ struct udevice *dev;
+ int ret;
+ int xpos, ypos;
+
+ splash_get_pos(&xpos, &ypos);
+
+ ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
+ if (ret)
+ return ret;
+
+ ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true);
+
+ return ret;
+}
+#endif /* CONFIG_DM_VIDEO */
diff --git a/board/toradex/common/tdx-common.h b/board/toradex/common/tdx-common.h
index c537dca71e5..63614c86714 100644
--- a/board/toradex/common/tdx-common.h
+++ b/board/toradex/common/tdx-common.h
@@ -11,4 +11,8 @@
int ft_common_board_setup(void *blob, bd_t *bd);
+#if defined(CONFIG_DM_VIDEO)
+int show_boot_logo(void);
+#endif
+
#endif /* _TDX_COMMON_H */