From: Guillaume La Roque (TI.com) Date: Mon, 24 Nov 2025 15:09:47 +0000 (+0100) Subject: board: ti: am6x: Restore do_board_detect functions X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3afc99727ad0e829b0275b3ffa5b970b343bc0db;p=pandora-u-boot.git board: ti: am6x: Restore do_board_detect functions This patch fixes a boot failure on the AM64x EVM that was introduced when the do_board_detect function was removed during a refactoring. It restores the do_board_detect function for the AM64x, AM62x, and AM65x boards to ensure the common board detection logic is executed correctly. Fixes: 804b80288ac ("board: am65x: Use generic AM6x board detection function") Fixes: ce56e553c31 ("board: am64x: Use generic AM6x board detection functions") Fixes: ff1b83c095c ("board: am62x: Add support for reading eeprom data") Signed-off-by: Guillaume La Roque (TI.com) --- diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 6bb243ee597..e9eba57eba7 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -82,11 +82,16 @@ struct efi_capsule_update_info update_info = { }; #if CONFIG_IS_ENABLED(TI_I2C_BOARD_DETECT) +int do_board_detect(void) +{ + return do_board_detect_am6(); +} + int checkboard(void) { struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA; - if (!do_board_detect_am6()) + if (!do_board_detect()) printf("Board: %s rev %s\n", ep->name, ep->version); return 0; @@ -97,7 +102,7 @@ static void setup_board_eeprom_env(void) { char *name = "am62x_skevm"; - if (do_board_detect_am6()) + if (do_board_detect()) goto invalid_eeprom; if (board_is_am62x_skevm()) diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index 3688cf2ca25..25076a8a588 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -114,11 +114,16 @@ void spl_perform_board_fixups(struct spl_image_info *spl_image) #endif #ifdef CONFIG_TI_I2C_BOARD_DETECT +int do_board_detect(void) +{ + return do_board_detect_am6(); +} + int checkboard(void) { struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA; - if (!do_board_detect_am6()) + if (!do_board_detect()) printf("Board: %s rev %s\n", ep->name, ep->version); return 0; @@ -135,7 +140,7 @@ static void setup_board_eeprom_env(void) { char *name = "am64x_gpevm"; - if (do_board_detect_am6()) + if (do_board_detect()) goto invalid_eeprom; if (board_is_am64x_gpevm()) diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 68606746d5f..b35a9229033 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -72,11 +72,16 @@ int board_fit_config_name_match(const char *name) #endif #ifdef CONFIG_TI_I2C_BOARD_DETECT +int do_board_detect(void) +{ + return do_board_detect_am6(); +} + int checkboard(void) { struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA; - if (do_board_detect_am6()) + if (do_board_detect()) /* EEPROM not populated */ printf("Board: %s rev %s\n", "AM6-COMPROCEVM", "E3"); else @@ -89,7 +94,7 @@ static void setup_board_eeprom_env(void) { char *name = "am65x"; - if (do_board_detect_am6()) + if (do_board_detect()) goto invalid_eeprom; if (board_is_am65x_base_board()) diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index d49e26fa453..a235ea9ef21 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -825,7 +825,7 @@ bool __maybe_unused board_ti_was_eeprom_read(void) return false; } -#if CONFIG_IS_ENABLED(TI_I2C_BOARD_DETECT) +#if IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT) int do_board_detect_am6(void) { int ret;