2018-05-07 06:58:06 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2012-01-12 12:28:09 +09: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 16:37:19 +09:00
|
|
|
|
2012-01-12 12:28:09 +09:00
|
|
|
#ifndef _EEPROM_
|
|
|
|
#define _EEPROM_
|
2015-09-06 17:48:37 +09:00
|
|
|
#include <errno.h>
|
2012-01-12 12:28:09 +09:00
|
|
|
|
2014-04-16 19:48:26 +09:00
|
|
|
#ifdef CONFIG_SYS_I2C
|
2015-01-14 17:42:43 +09:00
|
|
|
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
|
2015-09-06 17:48:35 +09:00
|
|
|
u32 cl_eeprom_get_board_rev(uint eeprom_bus);
|
2015-09-06 17:48:37 +09:00
|
|
|
int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus);
|
2012-01-12 12:28:09 +09:00
|
|
|
#else
|
2015-01-14 17:42:43 +09:00
|
|
|
static inline int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus)
|
2012-01-12 12:28:09 +09:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2015-09-06 17:48:35 +09:00
|
|
|
static inline u32 cl_eeprom_get_board_rev(uint eeprom_bus)
|
2012-05-24 13:01:24 +09:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2015-09-06 17:48:37 +09:00
|
|
|
static inline int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus)
|
|
|
|
{
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|
2012-01-12 12:28:09 +09:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|