diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2022-02-15 07:47:55 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-04 15:20:06 -0500 |
commit | f7fbe547d99729cfa36238ba1629c26589834867 (patch) | |
tree | 2294ead6e49555e2e3d1bf74ad975f0cf1a4ffe4 /board | |
parent | 4ff9a8c33c5f2514ee6e66788259399b6626f6b5 (diff) | |
download | u-boot-f7fbe547d99729cfa36238ba1629c26589834867.zip u-boot-f7fbe547d99729cfa36238ba1629c26589834867.tar.gz u-boot-f7fbe547d99729cfa36238ba1629c26589834867.tar.bz2 |
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>
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/am65x/evm.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index fbe33cb..7182a8c 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -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,23 +354,26 @@ static int probe_daughtercards(void) return 0; } +#endif int board_late_init(void) { - struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA; + if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) { + struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA; - setup_board_eeprom_env(); + setup_board_eeprom_env(); - /* - * The first MAC address for ethernet a.k.a. ethernet0 comes from - * efuse populated via the am654 gigabit eth switch subsystem driver. - * All the other ones are populated via EEPROM, hence continue with - * an index of 1. - */ - board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt); + /* + * The first MAC address for ethernet a.k.a. ethernet0 comes from + * efuse populated via the am654 gigabit eth switch subsystem driver. + * All the other ones are populated via EEPROM, hence continue with + * an index of 1. + */ + board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt); - /* Check for and probe any plugged-in daughtercards */ - probe_daughtercards(); + /* Check for and probe any plugged-in daughtercards */ + probe_daughtercards(); + } return 0; } |