From: Guo Hao <[email protected]>
setup_board_eeprom_env() and setup_serial_am6() are only available when
TI_I2C_BOARD_DETECT is enabled.
IS_ENABLED() does not remove the guarded statements during preprocessing,
so disabling TI_I2C_BOARD_DETECT results in an implicit function
declaration error. Use a preprocessor condition to match the condition
used for the function definition.
Fixes: ff1b83c095c2 ("board: am62x: Add support for reading eeprom data")
Signed-off-by: Guo Hao <[email protected]>
---
board/ti/am62x/evm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
index 49e58ad6d6c..f54abb56384 100644
--- a/board/ti/am62x/evm.c
+++ b/board/ti/am62x/evm.c
@@ -125,10 +125,10 @@ invalid_eeprom:
#if CONFIG_IS_ENABLED(BOARD_LATE_INIT)
int board_late_init(void)
{
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
- setup_board_eeprom_env();
- setup_serial_am6();
- }
+#if CONFIG_IS_ENABLED(TI_I2C_BOARD_DETECT)
+ setup_board_eeprom_env();
+ setup_serial_am6();
+#endif
ti_set_fdt_env(NULL, NULL);
return 0;
---
base-commit: 501d76ca801343cce6dafb17740a8b679ed17072
change-id: 20260715-am62x-no-board-detect-6b2eb4f7dd06
Best regards,
--
Guo Hao <[email protected]>