summaryrefslogtreecommitdiff
path: root/board/ti/am62px/evm.c
diff options
context:
space:
mode:
authorDevarsh Thakkar <devarsht@ti.com>2024-03-05 18:14:10 +0530
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2024-03-21 14:26:33 +0000
commitdc05846ff29e6442579f03beb16648acf0cd8618 (patch)
tree031f01ff79a08eda6b59eda75d1a8ef48eda7a91 /board/ti/am62px/evm.c
parent5a3055dad3b5acc883fd2b2cc2222d1c34d3d7f2 (diff)
board: ti: am62x: am62px: evm: Update simple-framebuffer node in device-tree
Update simple-framebuffer device-tree node by enumerating framebuffer related information in existing simple-framebuffer node in Linux device-tree file and enabling it. While at it, ignore error return value for framebuffer related DT node updates as a non-zero return value for ft_board_setup is treated as a fatal error causing board reset. In case there is no simple-framebuffer stub detected in Linux kernel device-tree and video is still active, then update the device-tree to reserve the framebuffer region for the active splash screen. This helps preserve the splash screen till the display server takes over after OS is booted. In case the simplefb node update or the framebuffer reservation fails we treat it as a non-fatal error and avoid returning error to parent function as the non-zero return value of ft_board_setup is treated as fatal error which leads to board reset Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Diffstat (limited to 'board/ti/am62px/evm.c')
-rw-r--r--board/ti/am62px/evm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
index 5ab56260a4..060c150b56 100644
--- a/board/ti/am62px/evm.c
+++ b/board/ti/am62px/evm.c
@@ -12,6 +12,7 @@
#include <cpu_func.h>
#include <dm/uclass.h>
#include <env.h>
+#include <fdt_simplefb.h>
#include <fdt_support.h>
#include <spl.h>
#include <splash.h>
@@ -83,3 +84,23 @@ void spl_board_init(void)
splash_display();
}
#endif
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ int ret = -1;
+
+ if (IS_ENABLED(CONFIG_VIDEO)) {
+ if (IS_ENABLED(CONFIG_FDT_SIMPLEFB))
+ ret = fdt_simplefb_enable_and_mem_rsv(blob);
+
+ /* If simplefb is not enabled and video is active, then at least reserve
+ * the framebuffer region to preserve the splash screen while OS is booting
+ */
+ if (ret && video_is_active())
+ fdt_add_fb_mem_rsv(blob);
+ }
+
+ return 0;
+}
+#endif