aboutsummaryrefslogtreecommitdiff
path: root/board/compulab/common/eeprom.h
diff options
context:
space:
mode:
authorthead_admin <occ_thead@service.alibaba.com>2022-09-13 11:04:33 +0800
committerthead_admin <occ_thead@service.alibaba.com>2022-09-13 11:04:33 +0800
commit43db9e00d5837c100c0b2fbbee64a08ab807d1e0 (patch)
treeb40c0eed02935b6682e8c5c975e3016b6b2f55fe /board/compulab/common/eeprom.h
Linux_SDK_V0.9.5Linux_SDK_V0.9.5
Diffstat (limited to 'board/compulab/common/eeprom.h')
-rw-r--r--board/compulab/common/eeprom.h32
1 files changed, 32 insertions, 0 deletions
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. <www.compulab.co.il>
+ *
+ * Authors: Nikita Kiryanov <nikita@compulab.co.il>
+ * Igor Grinberg <grinberg@compulab.co.il>
+ */
+
+#ifndef _EEPROM_
+#define _EEPROM_
+#include <errno.h>
+
+#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