mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
common: Move old EEPROM functions into a new header
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>
This commit is contained in:
parent
533cee0a9c
commit
cb3ef6810a
19 changed files with 41 additions and 15 deletions
|
@ -116,21 +116,6 @@ phys_size_t get_effective_memsize(void);
|
|||
void reset_phy (void);
|
||||
void fdc_hw_init (void);
|
||||
|
||||
/* $(BOARD)/eeprom.c */
|
||||
#ifdef CONFIG_CMD_EEPROM
|
||||
void eeprom_init (int bus);
|
||||
int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
|
||||
int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned 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
|
||||
|
||||
#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
|
||||
# define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue