2012-01-12 03:28:09 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il>
|
|
|
|
*
|
|
|
|
* Authors: Nikita Kiryanov <nikita@compulab.co.il>
|
|
|
|
* Igor Grinberg <grinberg@compulab.co.il>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2012-01-12 03:28:09 +00:00
|
|
|
*/
|
2013-07-08 07:37:19 +00:00
|
|
|
|
2012-01-12 03:28:09 +00:00
|
|
|
#ifndef _EEPROM_
|
|
|
|
#define _EEPROM_
|
2015-09-06 08:48:37 +00:00
|
|
|
#include <errno.h>
|
2012-01-12 03:28:09 +00:00
|
|
|
|
2014-04-16 10:48:26 +00:00
|
|
|
#ifdef CONFIG_SYS_I2C
|
2015-01-14 08:42:43 +00:00
|
|
|
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
|
2015-09-06 08:48:35 +00:00
|
|
|
u32 cl_eeprom_get_board_rev(uint eeprom_bus);
|
2015-09-06 08:48:37 +00:00
|
|
|
int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
|
2012-01-12 03:28:09 +00:00
|
|
|
#else
|
2015-01-14 08:42:43 +00:00
|
|
|
static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
|
2012-01-12 03:28:09 +00:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2015-09-06 08:48:35 +00:00
|
|
|
static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus)
|
2012-05-24 04:01:24 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2015-09-06 08:48:37 +00:00
|
|
|
static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
2012-01-12 03:28:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|