From: Patrick Delaunay Date: Mon, 15 Jan 2024 14:05:54 +0000 (+0100) Subject: board: st: stm32mp2: add checkboard X-Git-Url: http://git.dujemihanovic.xyz/projects?a=commitdiff_plain;h=1067d7e3a00f7a50b6b50ea7ccac8ed46db1b0af;p=u-boot.git 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 Signed-off-by: Patrick Delaunay --- 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 #include #include +#include #include #include +#include /* * 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) {