1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il> 4 * 5 * Authors: Nikita Kiryanov <nikita@compulab.co.il> 6 * Igor Grinberg <grinberg@compulab.co.il> 7 */ 8 9#ifndef _EEPROM_ 10#define _EEPROM_ 11#include <errno.h> 12 13#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) 14int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); 15u32 cl_eeprom_get_board_rev(uint eeprom_bus); 16int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); 17#else 18static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus) 19{ 20 return 1; 21} 22static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus) 23{ 24 return 0; 25} 26static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus) 27{ 28 return -ENOSYS; 29} 30#endif 31 32#endif 33