mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-22 01:48:52 +09:00
![Simon Glass](/assets/img/avatar_default.png)
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
25 lines
715 B
C
25 lines
715 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2000-2009
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
*/
|
|
|
|
#ifndef __EEPROM_LEGACY_H
|
|
#define __EEPROM_LEGACY_H
|
|
|
|
#ifdef CONFIG_CMD_EEPROM
|
|
void eeprom_init(int bus);
|
|
int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
|
|
int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
|
|
#else
|
|
/*
|
|
* Some EEPROM code is depecated because it used the legacy I2C interface. Add
|
|
* some macros here so we don't have to touch every one of those uses
|
|
*/
|
|
#define eeprom_init(bus)
|
|
#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
|
|
#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
|
|
#endif
|
|
|
|
#endif
|