2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
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
|
|
|
|
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
|
|
|
|
2021-08-19 03:12:24 +00:00
|
|
|
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
|
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
|