board_detect.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Library to support early TI EVM EEPROM handling
  4. *
  5. * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com
  6. */
  7. #ifndef __BOARD_DETECT_H
  8. #define __BOARD_DETECT_H
  9. /* TI EEPROM MAGIC Header identifier */
  10. #include <linux/bitops.h>
  11. #define TI_EEPROM_HEADER_MAGIC 0xEE3355AA
  12. #define TI_DEAD_EEPROM_MAGIC 0xADEAD12C
  13. #define TI_EEPROM_HDR_NAME_LEN 8
  14. #define TI_EEPROM_HDR_REV_LEN 4
  15. #define TI_EEPROM_HDR_SERIAL_LEN 12
  16. #define TI_EEPROM_HDR_CONFIG_LEN 32
  17. #define TI_EEPROM_HDR_NO_OF_MAC_ADDR 3
  18. #define TI_EEPROM_HDR_ETH_ALEN 6
  19. /**
  20. * struct ti_am_eeprom - This structure holds data read in from the
  21. * AM335x, AM437x, AM57xx TI EVM EEPROMs.
  22. * @header: This holds the magic number
  23. * @name: The name of the board
  24. * @version: Board revision
  25. * @serial: Board serial number
  26. * @config: Reserved
  27. * @mac_addr: Any MAC addresses written in the EEPROM
  28. *
  29. * The data is this structure is read from the EEPROM on the board.
  30. * It is used for board detection which is based on name. It is used
  31. * to configure specific TI boards. This allows booting of multiple
  32. * TI boards with a single MLO and u-boot.
  33. */
  34. struct ti_am_eeprom {
  35. unsigned int header;
  36. char name[TI_EEPROM_HDR_NAME_LEN];
  37. char version[TI_EEPROM_HDR_REV_LEN];
  38. char serial[TI_EEPROM_HDR_SERIAL_LEN];
  39. char config[TI_EEPROM_HDR_CONFIG_LEN];
  40. char mac_addr[TI_EEPROM_HDR_NO_OF_MAC_ADDR][TI_EEPROM_HDR_ETH_ALEN];
  41. } __attribute__ ((__packed__));
  42. /* AM6x TI EVM EEPROM Definitions */
  43. #define TI_AM6_EEPROM_RECORD_BOARD_ID 0x01
  44. #define TI_AM6_EEPROM_RECORD_BOARD_INFO 0x10
  45. #define TI_AM6_EEPROM_RECORD_DDR_INFO 0x11
  46. #define TI_AM6_EEPROM_RECORD_DDR_SPD 0x12
  47. #define TI_AM6_EEPROM_RECORD_MAC_INFO 0x13
  48. #define TI_AM6_EEPROM_RECORD_END_LIST 0xFE
  49. /*
  50. * Common header for AM6x TI EVM EEPROM records. Used to encapsulate the config
  51. * EEPROM in its entirety as well as for individual records contained within.
  52. */
  53. struct ti_am6_eeprom_record_header {
  54. u8 id;
  55. u16 len;
  56. } __attribute__ ((__packed__));
  57. /* AM6x TI EVM EEPROM board ID structure */
  58. struct ti_am6_eeprom_record_board_id {
  59. u32 magic_number;
  60. struct ti_am6_eeprom_record_header header;
  61. } __attribute__ ((__packed__));
  62. /* AM6x TI EVM EEPROM board info structure */
  63. #define AM6_EEPROM_HDR_NAME_LEN 16
  64. #define AM6_EEPROM_HDR_VERSION_LEN 2
  65. #define AM6_EEPROM_HDR_PROC_NR_LEN 4
  66. #define AM6_EEPROM_HDR_VARIANT_LEN 2
  67. #define AM6_EEPROM_HDR_PCB_REV_LEN 2
  68. #define AM6_EEPROM_HDR_SCH_BOM_REV_LEN 2
  69. #define AM6_EEPROM_HDR_SW_REV_LEN 2
  70. #define AM6_EEPROM_HDR_VID_LEN 2
  71. #define AM6_EEPROM_HDR_BLD_WK_LEN 2
  72. #define AM6_EEPROM_HDR_BLD_YR_LEN 2
  73. #define AM6_EEPROM_HDR_4P_NR_LEN 6
  74. #define AM6_EEPROM_HDR_SERIAL_LEN 4
  75. struct ti_am6_eeprom_record_board_info {
  76. char name[AM6_EEPROM_HDR_NAME_LEN];
  77. char version[AM6_EEPROM_HDR_VERSION_LEN];
  78. char proc_number[AM6_EEPROM_HDR_PROC_NR_LEN];
  79. char variant[AM6_EEPROM_HDR_VARIANT_LEN];
  80. char pcb_revision[AM6_EEPROM_HDR_PCB_REV_LEN];
  81. char schematic_bom_revision[AM6_EEPROM_HDR_SCH_BOM_REV_LEN];
  82. char software_revision[AM6_EEPROM_HDR_SW_REV_LEN];
  83. char vendor_id[AM6_EEPROM_HDR_VID_LEN];
  84. char build_week[AM6_EEPROM_HDR_BLD_WK_LEN];
  85. char build_year[AM6_EEPROM_HDR_BLD_YR_LEN];
  86. char board_4p_number[AM6_EEPROM_HDR_4P_NR_LEN];
  87. char serial[AM6_EEPROM_HDR_SERIAL_LEN];
  88. } __attribute__ ((__packed__));
  89. /* Memory location to keep a copy of the AM6 board info record */
  90. #define TI_AM6_EEPROM_BD_INFO_DATA ((struct ti_am6_eeprom_record_board_info *) \
  91. TI_SRAM_SCRATCH_BOARD_EEPROM_START)
  92. /* AM6x TI EVM EEPROM DDR info structure */
  93. #define TI_AM6_EEPROM_DDR_CTRL_INSTANCE_MASK GENMASK(1, 0)
  94. #define TI_AM6_EEPROM_DDR_CTRL_INSTANCE_SHIFT 0
  95. #define TI_AM6_EEPROM_DDR_CTRL_SPD_DATA_LOC_MASK GENMASK(3, 2)
  96. #define TI_AM6_EEPROM_DDR_CTRL_SPD_DATA_LOC_NA (0 << 2)
  97. #define TI_AM6_EEPROM_DDR_CTRL_SPD_DATA_LOC_BOARDID (2 << 2)
  98. #define TI_AM6_EEPROM_DDR_CTRL_SPD_DATA_LOC_I2C51 (3 << 2)
  99. #define TI_AM6_EEPROM_DDR_CTRL_MEM_TYPE_MASK GENMASK(5, 4)
  100. #define TI_AM6_EEPROM_DDR_CTRL_MEM_TYPE_DDR3 (0 << 4)
  101. #define TI_AM6_EEPROM_DDR_CTRL_MEM_TYPE_DDR4 (1 << 4)
  102. #define TI_AM6_EEPROM_DDR_CTRL_MEM_TYPE_LPDDR4 (2 << 4)
  103. #define TI_AM6_EEPROM_DDR_CTRL_IF_DATA_WIDTH_MASK GENMASK(7, 6)
  104. #define TI_AM6_EEPROM_DDR_CTRL_IF_DATA_WIDTH_16 (0 << 6)
  105. #define TI_AM6_EEPROM_DDR_CTRL_IF_DATA_WIDTH_32 (1 << 6)
  106. #define TI_AM6_EEPROM_DDR_CTRL_IF_DATA_WIDTH_64 (2 << 6)
  107. #define TI_AM6_EEPROM_DDR_CTRL_DEV_DATA_WIDTH_MASK GENMASK(9, 8)
  108. #define TI_AM6_EEPROM_DDR_CTRL_DEV_DATA_WIDTH_8 (0 << 8)
  109. #define TI_AM6_EEPROM_DDR_CTRL_DEV_DATA_WIDTH_16 (1 << 8)
  110. #define TI_AM6_EEPROM_DDR_CTRL_DEV_DATA_WIDTH_32 (2 << 8)
  111. #define TI_AM6_EEPROM_DDR_CTRL_RANKS_2 BIT(10)
  112. #define TI_AM6_EEPROM_DDR_CTRL_DENS_MASK GENMASK(13, 11)
  113. #define TI_AM6_EEPROM_DDR_CTRL_DENS_1GB (0 << 11)
  114. #define TI_AM6_EEPROM_DDR_CTRL_DENS_2GB (1 << 11)
  115. #define TI_AM6_EEPROM_DDR_CTRL_DENS_4GB (2 << 11)
  116. #define TI_AM6_EEPROM_DDR_CTRL_DENS_8GB (3 << 11)
  117. #define TI_AM6_EEPROM_DDR_CTRL_DENS_12GB (4 << 11)
  118. #define TI_AM6_EEPROM_DDR_CTRL_DENS_16GB (5 << 11)
  119. #define TI_AM6_EEPROM_DDR_CTRL_DENS_24GB (6 << 11)
  120. #define TI_AM6_EEPROM_DDR_CTRL_DENS_32GB (7 << 11)
  121. #define TI_AM6_EEPROM_DDR_CTRL_ECC BIT(14)
  122. struct ti_am6_eeprom_record_ddr_info {
  123. u16 ddr_control;
  124. } __attribute__ ((__packed__));
  125. /* AM6x TI EVM EEPROM DDR SPD structure */
  126. #define TI_AM6_EEPROM_DDR_SPD_INSTANCE_MASK GENMASK(1, 0)
  127. #define TI_AM6_EEPROM_DDR_SPD_INSTANCE_SHIFT 0
  128. #define TI_AM6_EEPROM_DDR_SPD_MEM_TYPE_MASK GENMASK(4, 3)
  129. #define TI_AM6_EEPROM_DDR_SPD_MEM_TYPE_DDR3 (0 << 3)
  130. #define TI_AM6_EEPROM_DDR_SPD_MEM_TYPE_DDR4 (1 << 3)
  131. #define TI_AM6_EEPROM_DDR_SPD_MEM_TYPE_LPDDR4 (2 << 3)
  132. #define TI_AM6_EEPROM_DDR_SPD_DATA_LEN 512
  133. struct ti_am6_eeprom_record_ddr_spd {
  134. u16 spd_control;
  135. u8 data[TI_AM6_EEPROM_DDR_SPD_DATA_LEN];
  136. } __attribute__ ((__packed__));
  137. /* AM6x TI EVM EEPROM MAC info structure */
  138. #define TI_AM6_EEPROM_MAC_INFO_INSTANCE_MASK GENMASK(2, 0)
  139. #define TI_AM6_EEPROM_MAC_INFO_INSTANCE_SHIFT 0
  140. #define TI_AM6_EEPROM_MAC_ADDR_COUNT_MASK GENMASK(7, 3)
  141. #define TI_AM6_EEPROM_MAC_ADDR_COUNT_SHIFT 3
  142. #define TI_AM6_EEPROM_MAC_ADDR_MAX_COUNT 32
  143. struct ti_am6_eeprom_record_mac_info {
  144. u16 mac_control;
  145. u8 mac_addr[TI_AM6_EEPROM_MAC_ADDR_MAX_COUNT][TI_EEPROM_HDR_ETH_ALEN];
  146. } __attribute__ ((__packed__));
  147. struct ti_am6_eeprom_record {
  148. struct ti_am6_eeprom_record_header header;
  149. union {
  150. struct ti_am6_eeprom_record_board_info board_info;
  151. struct ti_am6_eeprom_record_ddr_info ddr_info;
  152. struct ti_am6_eeprom_record_ddr_spd ddr_spd;
  153. struct ti_am6_eeprom_record_mac_info mac_info;
  154. } data;
  155. } __attribute__ ((__packed__));
  156. /* DRA7 EEPROM MAGIC Header identifier */
  157. #define DRA7_EEPROM_HEADER_MAGIC 0xAA5533EE
  158. #define DRA7_EEPROM_HDR_NAME_LEN 16
  159. #define DRA7_EEPROM_HDR_CONFIG_LEN 4
  160. /**
  161. * struct dra7_eeprom - This structure holds data read in from the DRA7 EVM
  162. * EEPROMs.
  163. * @header: This holds the magic number
  164. * @name: The name of the board
  165. * @version_major: Board major version
  166. * @version_minor: Board minor version
  167. * @config: Board specific config options
  168. * @emif1_size: Size of DDR attached to EMIF1
  169. * @emif2_size: Size of DDR attached to EMIF2
  170. *
  171. * The data is this structure is read from the EEPROM on the board.
  172. * It is used for board detection which is based on name. It is used
  173. * to configure specific DRA7 boards. This allows booting of multiple
  174. * DRA7 boards with a single MLO and u-boot.
  175. */
  176. struct dra7_eeprom {
  177. u32 header;
  178. char name[DRA7_EEPROM_HDR_NAME_LEN];
  179. u16 version_major;
  180. u16 version_minor;
  181. char config[DRA7_EEPROM_HDR_CONFIG_LEN];
  182. u32 emif1_size;
  183. u32 emif2_size;
  184. } __attribute__ ((__packed__));
  185. /**
  186. * struct ti_common_eeprom - Null terminated, usable EEPROM contents.
  187. * header: Magic number
  188. * @name: NULL terminated name
  189. * @version: NULL terminated version
  190. * @serial: NULL terminated serial number
  191. * @config: NULL terminated Board specific config options
  192. * @mac_addr: MAC addresses
  193. * @emif1_size: Size of the ddr available on emif1
  194. * @emif2_size: Size of the ddr available on emif2
  195. */
  196. struct ti_common_eeprom {
  197. u32 header;
  198. char name[TI_EEPROM_HDR_NAME_LEN + 1];
  199. char version[TI_EEPROM_HDR_REV_LEN + 1];
  200. char serial[TI_EEPROM_HDR_SERIAL_LEN + 1];
  201. char config[TI_EEPROM_HDR_CONFIG_LEN + 1];
  202. char mac_addr[TI_EEPROM_HDR_NO_OF_MAC_ADDR][TI_EEPROM_HDR_ETH_ALEN];
  203. u64 emif1_size;
  204. u64 emif2_size;
  205. };
  206. #define TI_EEPROM_DATA ((struct ti_common_eeprom *)\
  207. TI_SRAM_SCRATCH_BOARD_EEPROM_START)
  208. /*
  209. * Maximum number of Ethernet MAC addresses extracted from the AM6x on-board
  210. * EEPROM during the initial probe and carried forward in SRAM.
  211. */
  212. #define AM6_EEPROM_HDR_NO_OF_MAC_ADDR 8
  213. /**
  214. * struct ti_am6_eeprom - Null terminated, usable EEPROM contents, as extracted
  215. * from the AM6 on-board EEPROM. Note that we only carry a subset of data
  216. * at this time to be considerate about memory consumption.
  217. * @header: Magic number for data validity indication
  218. * @name: NULL terminated name
  219. * @version: NULL terminated version
  220. * @software_revision: NULL terminated software revision
  221. * @serial: Board serial number
  222. * @mac_addr_cnt: Number of MAC addresses stored in this object
  223. * @mac_addr: MAC addresses
  224. */
  225. struct ti_am6_eeprom {
  226. u32 header;
  227. char name[AM6_EEPROM_HDR_NAME_LEN + 1];
  228. char version[AM6_EEPROM_HDR_VERSION_LEN + 1];
  229. char software_revision[AM6_EEPROM_HDR_SW_REV_LEN + 1];
  230. char serial[AM6_EEPROM_HDR_SERIAL_LEN + 1];
  231. u8 mac_addr_cnt;
  232. char mac_addr[AM6_EEPROM_HDR_NO_OF_MAC_ADDR][TI_EEPROM_HDR_ETH_ALEN];
  233. };
  234. #define TI_AM6_EEPROM_DATA ((struct ti_am6_eeprom *) \
  235. TI_SRAM_SCRATCH_BOARD_EEPROM_START)
  236. /**
  237. * ti_i2c_eeprom_am_get() - Consolidated eeprom data collection for AM* TI EVMs
  238. * @bus_addr: I2C bus address
  239. * @dev_addr: I2C slave address
  240. *
  241. * ep in SRAM is populated by the this AM generic function that consolidates
  242. * the basic initialization logic common across all AM* platforms.
  243. */
  244. int ti_i2c_eeprom_am_get(int bus_addr, int dev_addr);
  245. /**
  246. * ti_emmc_boardid_get() - Fetch board ID information from eMMC
  247. *
  248. * ep in SRAM is populated by the this function that is currently
  249. * based on BeagleBone AI, but could be made more general across AM*
  250. * platforms.
  251. */
  252. int __maybe_unused ti_emmc_boardid_get(void);
  253. /**
  254. * ti_i2c_eeprom_dra7_get() - Consolidated eeprom data for DRA7 TI EVMs
  255. * @bus_addr: I2C bus address
  256. * @dev_addr: I2C slave address
  257. */
  258. int ti_i2c_eeprom_dra7_get(int bus_addr, int dev_addr);
  259. /**
  260. * ti_i2c_eeprom_am6_get() - Consolidated eeprom data for AM6x TI EVMs and
  261. * associated daughter cards, parsed into user-
  262. * provided data structures
  263. * @bus_addr: I2C bus address
  264. * @dev_addr: I2C slave address
  265. * @ep: Pointer to structure receiving AM6-specific header data
  266. * @mac_addr: Pointer to memory receiving parsed MAC addresses. May be
  267. * NULL to skip MAC parsing.
  268. * @mac_addr_max_cnt: Maximum number of MAC addresses that can be stored into
  269. * mac_addr. May be NULL to skip MAC parsing.
  270. * @mac_addr_cnt: Pointer to a location returning how many MAC addressed got
  271. * actually parsed.
  272. */
  273. int __maybe_unused ti_i2c_eeprom_am6_get(int bus_addr, int dev_addr,
  274. struct ti_am6_eeprom *ep,
  275. char **mac_addr,
  276. u8 mac_addr_max_cnt,
  277. u8 *mac_addr_cnt);
  278. /**
  279. * ti_i2c_eeprom_am6_get_base() - Consolidated eeprom data for AM6x TI EVMs
  280. * @bus_addr: I2C bus address
  281. * @dev_addr: I2C slave address
  282. */
  283. int __maybe_unused ti_i2c_eeprom_am6_get_base(int bus_addr, int dev_addr);
  284. #ifdef CONFIG_TI_I2C_BOARD_DETECT
  285. /**
  286. * board_ti_is() - Board detection logic for TI EVMs
  287. * @name_tag: Tag used in eeprom for the board
  288. *
  289. * Return: false if board information does not match OR eeprom wasn't read.
  290. * true otherwise
  291. */
  292. bool board_ti_is(char *name_tag);
  293. /**
  294. * board_ti_k3_is() - Board detection logic for TI K3 EVMs
  295. * @name_tag: Tag used in eeprom for the board
  296. *
  297. * Return: false if board information does not match OR eeprom wasn't read.
  298. * true otherwise
  299. */
  300. bool board_ti_k3_is(char *name_tag);
  301. /**
  302. * board_ti_rev_is() - Compare board revision for TI EVMs
  303. * @rev_tag: Revision tag to check in eeprom
  304. * @cmp_len: How many chars to compare?
  305. *
  306. * NOTE: revision information is often messed up (hence the str len match) :(
  307. *
  308. * Return: false if board information does not match OR eeprom wasn't read.
  309. * true otherwise
  310. */
  311. bool board_ti_rev_is(char *rev_tag, int cmp_len);
  312. /**
  313. * board_ti_get_rev() - Get board revision for TI EVMs
  314. *
  315. * Return: Empty string if eeprom wasn't read.
  316. * Board revision otherwise
  317. */
  318. char *board_ti_get_rev(void);
  319. /**
  320. * board_ti_get_config() - Get board config for TI EVMs
  321. *
  322. * Return: Empty string if eeprom wasn't read.
  323. * Board config otherwise
  324. */
  325. char *board_ti_get_config(void);
  326. /**
  327. * board_ti_get_name() - Get board name for TI EVMs
  328. *
  329. * Return: Empty string if eeprom wasn't read.
  330. * Board name otherwise
  331. */
  332. char *board_ti_get_name(void);
  333. /**
  334. * board_ti_get_eth_mac_addr() - Get Ethernet MAC address from EEPROM MAC list
  335. * @index: 0 based index within the list of MAC addresses
  336. * @mac_addr: MAC address contained at the index is returned here
  337. *
  338. * Does not sanity check the mac_addr. Whatever is stored in EEPROM is returned.
  339. */
  340. void board_ti_get_eth_mac_addr(int index, u8 mac_addr[TI_EEPROM_HDR_ETH_ALEN]);
  341. /**
  342. * board_ti_get_emif1_size() - Get size of the DDR on emif1 for TI EVMs
  343. *
  344. * Return: NULL if eeprom wasn't read or emif1_size is not available.
  345. */
  346. u64 board_ti_get_emif1_size(void);
  347. /**
  348. * board_ti_get_emif2_size() - Get size of the DDR on emif2 for TI EVMs
  349. *
  350. * Return: NULL if eeprom wasn't read or emif2_size is not available.
  351. */
  352. u64 board_ti_get_emif2_size(void);
  353. /**
  354. * set_board_info_env() - Setup commonly used board information environment vars
  355. * @name: Name of the board
  356. *
  357. * If name is NULL, default_name is used.
  358. */
  359. void set_board_info_env(char *name);
  360. /**
  361. * set_board_info_env_am6() - Setup commonly used board information environment
  362. * vars for AM6-type boards
  363. * @name: Name of the board
  364. *
  365. * If name is NULL, default_name is used.
  366. */
  367. void set_board_info_env_am6(char *name);
  368. /**
  369. * board_ti_set_ethaddr- Sets the ethaddr environment from EEPROM
  370. * @index: The first eth<index>addr environment variable to set
  371. *
  372. * EEPROM should be already read before calling this function.
  373. * The EEPROM contains 2 MAC addresses which define the MAC address
  374. * range (i.e. first and last MAC address).
  375. * This function sets the ethaddr environment variable for all
  376. * the available MAC addresses starting from eth<index>addr.
  377. */
  378. void board_ti_set_ethaddr(int index);
  379. /**
  380. * board_ti_am6_set_ethaddr- Sets the ethaddr environment from EEPROM
  381. * @index: The first eth<index>addr environment variable to set
  382. * @count: The number of MAC addresses to process
  383. *
  384. * EEPROM should be already read before calling this function. The EEPROM
  385. * contains n dedicated MAC addresses. This function sets the ethaddr
  386. * environment variable for all the available MAC addresses starting
  387. * from eth<index>addr.
  388. */
  389. void board_ti_am6_set_ethaddr(int index, int count);
  390. /**
  391. * board_ti_was_eeprom_read() - Check to see if the eeprom contents have been read
  392. *
  393. * This function is useful to determine if the eeprom has already been read and
  394. * its contents have already been loaded into memory. It utiltzes the magic
  395. * number that the header value is set to upon successful eeprom read.
  396. */
  397. bool board_ti_was_eeprom_read(void);
  398. /**
  399. * ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values
  400. * @name: Name of the board
  401. * @rev: Revision of the board
  402. *
  403. * In some cases such as in RTC-only mode, we are able to skip reading eeprom
  404. * and wasting i2c based initialization time by using predefined flags for
  405. * detecting what platform we are booting on. For those platforms, provide
  406. * a handy function to pre-program information.
  407. *
  408. * NOTE: many eeprom information such as serial number, mac address etc is not
  409. * available.
  410. *
  411. * Return: 0 if all went fine, else return error.
  412. */
  413. int ti_i2c_eeprom_am_set(const char *name, const char *rev);
  414. #else
  415. static inline bool board_ti_is(char *name_tag) { return false; };
  416. static inline bool board_ti_k3_is(char *name_tag) { return false; };
  417. static inline bool board_ti_rev_is(char *rev_tag, int cmp_len)
  418. { return false; };
  419. static inline char *board_ti_get_rev(void) { return NULL; };
  420. static inline char *board_ti_get_config(void) { return NULL; };
  421. static inline char *board_ti_get_name(void) { return NULL; };
  422. static inline bool board_ti_was_eeprom_read(void) { return false; };
  423. static inline int ti_i2c_eeprom_am_set(const char *name, const char *rev)
  424. { return -EINVAL; };
  425. #endif
  426. #endif /* __BOARD_DETECT_H */