diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2020-08-05 20:14:13 +0300 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2020-08-11 18:04:46 +0300 |
commit | 6b889389b6700fe56b191be6b4e31b0db7d1652a (patch) | |
tree | 4f35baa28c9b3b1ed5c154fe4c941dbc70cc5811 | |
parent | 49b2830c85b1d3f1b5b5e2a426bb3ecf05963ee1 (diff) | |
download | u-boot-6b889389b6700fe56b191be6b4e31b0db7d1652a.tar.xz |
board: ti: board_detect: Add stub functions for EEPROM detection apis
Current usage of eeprom apis produce a build failure when
CONFIG_TI_I2C_BOARD_DETECT is not defined. Add stub function for these
apis to avoid build failures.
Reviewed-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
-rw-r--r-- | board/ti/common/board_detect.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h index 9f75b5c004..de7cb52dfc 100644 --- a/board/ti/common/board_detect.h +++ b/board/ti/common/board_detect.h @@ -311,6 +311,7 @@ int __maybe_unused ti_i2c_eeprom_am6_get(int bus_addr, int dev_addr, */ int __maybe_unused ti_i2c_eeprom_am6_get_base(int bus_addr, int dev_addr); +#ifdef CONFIG_TI_I2C_BOARD_DETECT /** * board_ti_is() - Board detection logic for TI EVMs * @name_tag: Tag used in eeprom for the board @@ -454,5 +455,17 @@ bool board_ti_was_eeprom_read(void); * Return: 0 if all went fine, else return error. */ int ti_i2c_eeprom_am_set(const char *name, const char *rev); +#else +static inline bool board_ti_is(char *name_tag) { return false; }; +static inline bool board_ti_k3_is(char *name_tag) { return false; }; +static inline bool board_ti_rev_is(char *rev_tag, int cmp_len) +{ return false; }; +static inline char *board_ti_get_rev(void) { return NULL; }; +static inline char *board_ti_get_config(void) { return NULL; }; +static inline char *board_ti_get_name(void) { return NULL; }; +static inline bool board_ti_was_eeprom_read(void) { return false; }; +static inline int ti_i2c_eeprom_am_set(const char *name, const char *rev) +{ return -EINVAL; }; +#endif #endif /* __BOARD_DETECT_H */ |