eeprom.h 528 B

123456789101112131415161718192021222324252627
  1. /*
  2. * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il>
  3. *
  4. * Authors: Nikita Kiryanov <nikita@compulab.co.il>
  5. * Igor Grinberg <grinberg@compulab.co.il>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef _EEPROM_
  10. #define _EEPROM_
  11. #ifdef CONFIG_SYS_I2C
  12. int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
  13. u32 cl_eeprom_get_board_rev(void);
  14. #else
  15. static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
  16. {
  17. return 1;
  18. }
  19. static inline u32 cl_eeprom_get_board_rev(void)
  20. {
  21. return 0;
  22. }
  23. #endif
  24. #endif