Teresa Remmet | c6dd9c6 | 2023-08-17 10:57:07 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * Copyright (C) 2023 PHYTEC Messtechnik GmbH |
| 4 | * Author: Teresa Remmet <t.remmet@phytec.de> |
| 5 | */ |
| 6 | |
| 7 | #ifndef _PHYTEC_IMX8M_SOM_DETECTION_H |
| 8 | #define _PHYTEC_IMX8M_SOM_DETECTION_H |
| 9 | |
| 10 | #include "phytec_som_detection.h" |
| 11 | |
| 12 | #define PHYTEC_IMX8MQ_SOM 66 |
| 13 | #define PHYTEC_IMX8MM_SOM 69 |
| 14 | #define PHYTEC_IMX8MP_SOM 70 |
| 15 | |
| 16 | #if IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) |
| 17 | |
| 18 | u8 __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data); |
| 19 | u8 __maybe_unused phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data); |
| 20 | u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data); |
| 21 | u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data); |
| 22 | u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data); |
| 23 | |
| 24 | #else |
| 25 | |
| 26 | inline u8 __maybe_unused phytec_imx8m_detect(struct phytec_eeprom_data *data) |
| 27 | { |
| 28 | return -1; |
| 29 | } |
| 30 | |
| 31 | inline u8 __maybe_unused |
| 32 | phytec_get_imx8m_ddr_size(struct phytec_eeprom_data *data) |
| 33 | { |
| 34 | return PHYTEC_EEPROM_INVAL; |
| 35 | } |
| 36 | |
| 37 | inline u8 __maybe_unused phytec_get_imx8mp_rtc(struct phytec_eeprom_data *data) |
| 38 | { |
| 39 | return PHYTEC_EEPROM_INVAL; |
| 40 | } |
| 41 | |
| 42 | inline u8 __maybe_unused phytec_get_imx8m_spi(struct phytec_eeprom_data *data) |
| 43 | { |
| 44 | return PHYTEC_EEPROM_INVAL; |
| 45 | } |
| 46 | |
| 47 | inline u8 __maybe_unused phytec_get_imx8m_eth(struct phytec_eeprom_data *data) |
| 48 | { |
| 49 | return PHYTEC_EEPROM_INVAL; |
| 50 | } |
| 51 | |
| 52 | #endif /* IS_ENABLED(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) */ |
| 53 | |
| 54 | #endif /* _PHYTEC_IMX8M_SOM_DETECTION_H */ |