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>
};
#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;
{
char *name = "am62x_skevm";
- if (do_board_detect_am6())
+ if (do_board_detect())
goto invalid_eeprom;
if (board_is_am62x_skevm())
#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;
{
char *name = "am64x_gpevm";
- if (do_board_detect_am6())
+ if (do_board_detect())
goto invalid_eeprom;
if (board_is_am64x_gpevm())
#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
{
char *name = "am65x";
- if (do_board_detect_am6())
+ if (do_board_detect())
goto invalid_eeprom;
if (board_is_am65x_base_board())
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;