blob: c0b4739ea2351362276458fe85147e713eea1f73 [file] [log] [blame]
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +00001/*
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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +00008 */
Wolfgang Denk1a459662013-07-08 09:37:19 +02009
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +000010#ifndef _EEPROM_
11#define _EEPROM_
Nikita Kiryanov53af8772015-09-06 11:48:37 +030012#include <errno.h>
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +000013
Ilya Ledvich39338a32014-04-16 13:48:26 +030014#ifdef CONFIG_SYS_I2C
Nikita Kiryanove7a24472015-01-14 10:42:43 +020015int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
Nikita Kiryanov72898ac2015-09-06 11:48:35 +030016u32 cl_eeprom_get_board_rev(uint eeprom_bus);
Nikita Kiryanov53af8772015-09-06 11:48:37 +030017int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +000018#else
Nikita Kiryanove7a24472015-01-14 10:42:43 +020019static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +000020{
21 return 1;
22}
Nikita Kiryanov72898ac2015-09-06 11:48:35 +030023static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus)
Nikita Kiryanov8c318eb2012-05-24 04:01:24 +000024{
25 return 0;
26}
Nikita Kiryanov53af8772015-09-06 11:48:37 +030027static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus)
28{
29 return -ENOSYS;
30}
Nikita Kiryanove4e2bf52012-01-12 03:28:09 +000031#endif
32
33#endif