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 10#ifndef _EEPROM_ 11#define _EEPROM_ 12#include <errno.h> 13 14#ifdef CONFIG_SYS_I2C 15int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); 16u32 cl_eeprom_get_board_rev(uint eeprom_bus); 17int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); 18#else 19static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus) 20{ 21 return 1; 22} 23static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus) 24{ 25 return 0; 26} 27static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus) 28{ 29 return -ENOSYS; 30} 31#endif 32 33#endif 34