diff options
author | Marek Vasut <marex@denx.de> | 2020-07-31 01:35:33 +0200 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@st.com> | 2020-08-13 09:55:58 +0200 |
commit | 49650c75119ef761d0e3bd9c7e8b33d8eef4b755 (patch) | |
tree | a2b129a8546aeae7d3155f1b9d23857bed8f4722 /board/dhelectronics/dh_stm32mp1/board.c | |
parent | acdaae63903f26a4a73fffd3b2e3b30b9a5294ba (diff) | |
download | u-boot-49650c75119ef761d0e3bd9c7e8b33d8eef4b755.tar.gz |
ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage its
Include both PDK2 and DRC02 DTs in the DHCOM fitImage .its and implement
support in SPL to select the correct configuration entry for U-Boot by
using the machine compatible string from SPL DT.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'board/dhelectronics/dh_stm32mp1/board.c')
-rw-r--r-- | board/dhelectronics/dh_stm32mp1/board.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index 17dbf20d76a..eec51d233e6 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -216,9 +216,13 @@ int board_early_init_f(void) #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { - char test[20]; + const char *compat; + char test[128]; - snprintf(test, sizeof(test), "somrev%d_boardrev%d", somcode, brdcode); + compat = fdt_getprop(gd->fdt_blob, 0, "compatible", NULL); + + snprintf(test, sizeof(test), "%s_somrev%d_boardrev%d", + compat, somcode, brdcode); if (!strcmp(name, test)) return 0; |