summaryrefslogtreecommitdiff
path: root/board/st
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2024-01-15 15:05:54 +0100
committerPatrice Chotard <patrice.chotard@foss.st.com>2024-01-19 14:38:59 +0100
commit1067d7e3a00f7a50b6b50ea7ccac8ed46db1b0af (patch)
treec24bb109fc84cea2fd46149b3fbbfac36c40c474 /board/st
parentebf32b2548b69923d439f58c637fa2b3b10e24c5 (diff)
downloadu-boot-1067d7e3a00f7a50b6b50ea7ccac8ed46db1b0af.tar.gz
u-boot-1067d7e3a00f7a50b6b50ea7ccac8ed46db1b0af.tar.bz2
u-boot-1067d7e3a00f7a50b6b50ea7ccac8ed46db1b0af.zip
board: st: stm32mp2: add checkboard
Implement the weak function checkboard to identify the used board with compatible in device tree for the support of stm32mp2 STMicroelectronics boards. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'board/st')
-rw-r--r--board/st/stm32mp2/stm32mp2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/st/stm32mp2/stm32mp2.c b/board/st/stm32mp2/stm32mp2.c
index c97a7efff4..9a881583d9 100644
--- a/board/st/stm32mp2/stm32mp2.c
+++ b/board/st/stm32mp2/stm32mp2.c
@@ -8,14 +8,28 @@
#include <config.h>
#include <env.h>
#include <fdt_support.h>
+#include <log.h>
#include <asm/global_data.h>
#include <asm/arch/sys_proto.h>
+#include <dm/ofnode.h>
/*
* Get a global data pointer
*/
DECLARE_GLOBAL_DATA_PTR;
+int checkboard(void)
+{
+ const char *fdt_compat;
+ int fdt_compat_len;
+
+ fdt_compat = ofnode_get_property(ofnode_root(), "compatible", &fdt_compat_len);
+
+ log_info("Board: stm32mp2 (%s)\n", fdt_compat && fdt_compat_len ? fdt_compat : "");
+
+ return 0;
+}
+
/* board dependent setup after realloc */
int board_init(void)
{