diff options
author | Yannic Moog <y.moog@phytec.de> | 2023-12-20 09:45:35 +0100 |
---|---|---|
committer | Fabio Estevam <festevam@denx.de> | 2023-12-20 15:04:46 -0300 |
commit | aa7858fe5e2ef3d74129175c4044c9bb59174b4a (patch) | |
tree | 38e6eeff55d72ced8a16569031d23b54bb34067c /board/phytec/common/imx8m_som_detection.c | |
parent | 71714cda3d077b9199e3bfda8cbf0a081b0a5fa9 (diff) |
board: phytec: som_detection: move definitions to source file
Move all function definitions in {phytec|imx8m}_som_detection from the
header to the source file to prevent potential linker error regarding
multiple definitions. Also move the #if blocks with the definitions.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Diffstat (limited to 'board/phytec/common/imx8m_som_detection.c')
-rw-r--r-- | board/phytec/common/imx8m_som_detection.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/board/phytec/common/imx8m_som_detection.c b/board/phytec/common/imx8m_som_detection.c index a229eae152..214b75db3b 100644 --- a/board/phytec/common/imx8m_som_detection.c +++ b/board/phytec/common/imx8m_som_detection.c @@ -15,6 +15,8 @@ extern struct phytec_eeprom_data eeprom_data; +#if IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) + /* Check if the SoM is actually one of the following products: * - i.MX8MM * - i.MX8MN @@ -166,3 +168,33 @@ u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data) debug("%s: rtc: %u\n", __func__, rtc); return rtc; } + +#else + +inline int __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data) +{ + return -1; +} + +inline u8 __maybe_unused +phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data) +{ + return PHYTEC_EEPROM_INVAL; +} + +inline u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data) +{ + return PHYTEC_EEPROM_INVAL; +} + +inline u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data) +{ + return PHYTEC_EEPROM_INVAL; +} + +inline u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data) +{ + return PHYTEC_EEPROM_INVAL; +} + +#endif /* IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) */ |