arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT

We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT
is set. Same as done for am64.

This makes it possible to add a custom am65 based board design to
U-Boot that does not use this board detection mechanism.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
Christian Gmeiner 2022-02-15 07:47:55 +01:00 committed by Tom Rini
parent 4ff9a8c33c
commit f7fbe547d9
2 changed files with 17 additions and 12 deletions

View File

@ -251,6 +251,7 @@ void board_init_f(ulong dummy)
k3_sysfw_print_ver();
/* Perform EEPROM-based board detection */
if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
do_board_detect();
#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)

View File

@ -129,6 +129,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
}
#endif
#ifdef CONFIG_TI_I2C_BOARD_DETECT
int do_board_detect(void)
{
int ret;
@ -353,9 +354,11 @@ static int probe_daughtercards(void)
return 0;
}
#endif
int board_late_init(void)
{
if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
setup_board_eeprom_env();
@ -370,6 +373,7 @@ int board_late_init(void)
/* Check for and probe any plugged-in daughtercards */
probe_daughtercards();
}
return 0;
}