From 43db9e00d5837c100c0b2fbbee64a08ab807d1e0 Mon Sep 17 00:00:00 2001 From: thead_admin Date: Tue, 13 Sep 2022 11:04:33 +0800 Subject: Linux_SDK_V0.9.5 --- board/compulab/common/eeprom.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 board/compulab/common/eeprom.h (limited to 'board/compulab/common/eeprom.h') diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h new file mode 100644 index 00000000..a9c0203b --- /dev/null +++ b/board/compulab/common/eeprom.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2011 CompuLab, Ltd. + * + * Authors: Nikita Kiryanov + * Igor Grinberg + */ + +#ifndef _EEPROM_ +#define _EEPROM_ +#include + +#ifdef CONFIG_SYS_I2C +int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); +u32 cl_eeprom_get_board_rev(uint eeprom_bus); +int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); +#else +static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus) +{ + return 1; +} +static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus) +{ + return 0; +} +static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus) +{ + return -ENOSYS; +} +#endif + +#endif -- cgit v1.2.3