Simon Glass | eba6b8d | 2019-11-14 12:57:50 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * (C) Copyright 2000-2009 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | */ |
| 6 | |
| 7 | #ifndef __EEPROM_LEGACY_H |
| 8 | #define __EEPROM_LEGACY_H |
| 9 | |
Rasmus Villemoes | 17f2cf7 | 2020-02-18 08:39:42 +0000 | [diff] [blame] | 10 | #if defined(CONFIG_CMD_EEPROM) || defined(CONFIG_ENV_IS_IN_EEPROM) |
Tom Rini | 67204f3 | 2024-04-30 20:40:50 -0600 | [diff] [blame] | 11 | #include <linux/types.h> |
| 12 | |
Simon Glass | eba6b8d | 2019-11-14 12:57:50 -0700 | [diff] [blame] | 13 | void eeprom_init(int bus); |
| 14 | int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt); |
| 15 | int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt); |
| 16 | #else |
| 17 | /* |
| 18 | * Some EEPROM code is depecated because it used the legacy I2C interface. Add |
| 19 | * some macros here so we don't have to touch every one of those uses |
| 20 | */ |
| 21 | #define eeprom_init(bus) |
Rasmus Villemoes | 17f2cf7 | 2020-02-18 08:39:42 +0000 | [diff] [blame] | 22 | #define eeprom_read(dev_addr, offset, buffer, cnt) (-ENOSYS) |
| 23 | #define eeprom_write(dev_addr, offset, buffer, cnt) (-ENOSYS) |
Simon Glass | eba6b8d | 2019-11-14 12:57:50 -0700 | [diff] [blame] | 24 | #endif |
| 25 | |
Simon Glass | eba6b8d | 2019-11-14 12:57:50 -0700 | [diff] [blame] | 26 | #endif |