[PATCH 04/18] board: ti: am64x: Add support for detecting multiple device trees
Lokesh Vutla
lokeshvutla at ti.com
Thu May 6 13:14:51 CEST 2021
Update the board_fit_config_name_match() to choose the right dtb.
Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
board/ti/am64x/evm.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index 18e49112ac..a1ffcb929c 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -46,10 +46,15 @@ int dram_init_banksize(void)
#if defined(CONFIG_SPL_LOAD_FIT)
int board_fit_config_name_match(const char *name)
{
-#if defined(CONFIG_TARGET_AM642_A53_EVM)
- if (!strcmp(name, "k3-am642-evm"))
- return 0;
-#endif
+ bool eeprom_read = board_ti_was_eeprom_read();
+
+ if (!eeprom_read || board_is_am64x_gpevm()) {
+ if (!strcmp(name, "k3-am642-r5-evm") || !strcmp(name, "k3-am642-evm"))
+ return 0;
+ } else if (board_is_am64x_skevm()) {
+ if (!strcmp(name, "k3-am642-r5-sk") || !strcmp(name, "k3-am642-sk"))
+ return 0;
+ }
return -1;
}
--
2.30.0
More information about the U-Boot
mailing list