board: ti: am6x: Restore do_board_detect functions
authorGuillaume La Roque (TI.com) <glaroque@baylibre.com>
Mon, 24 Nov 2025 15:09:47 +0000 (16:09 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 27 Nov 2025 15:27:03 +0000 (09:27 -0600)
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>
board/ti/am62x/evm.c
board/ti/am64x/evm.c
board/ti/am65x/evm.c
board/ti/common/board_detect.c

index 6bb243e..e9eba57 100644 (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())
index 3688cf2..25076a8 100644 (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())
index 6860674..b35a922 100644 (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())
index d49e26f..a235ea9 100644 (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;