Tianfei Zhang 15d21c8510 raw/ifpga/base: add I2C and at24 EEPROM driver
1. Add Altera I2C master device driver
2. Add at24 eeprom driver which is i2c slave device
3. Introducing a new ops for opae_manager: opae_manager_networking_ops.
This ops will include some networking operation by FPGA, like vBNG
operation, MAC ROM operation and so on.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00

15 lines
406 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2019 Intel Corporation
*/
#define AT24C512_PAGE_SIZE 128
#define AT24C512_IO_LIMIT 128
#define AT24512_SLAVE_ADDR 0x51
int at24_eeprom_read(struct altera_i2c_dev *dev, unsigned int slave_addr,
u32 offset, u8 *buf, int count);
int at24_eeprom_write(struct altera_i2c_dev *dev, unsigned int slave_addr,
u32 offset, u8 *buf, int count);