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) <glaroque@baylibre.com>
This commit is contained in:
Guillaume La Roque (TI.com) 2025-11-24 16:09:47 +01:00 committed by Tom Rini
parent cc0ce9e8c4
commit 3afc99727a
4 changed files with 22 additions and 7 deletions

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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;