summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCédric Le Goater2018-06-08 14:15:32 +0200
committerPeter Maydell2018-06-08 14:15:32 +0200
commite22242141331bc829ecca194f5c06f674da618ef (patch)
treee89ab28f42d5ccfdda995f3dafe35b5788f20634 /include
parentaspeed: add an I2C RTC device to all machines (diff)
downloadqemu-e22242141331bc829ecca194f5c06f674da618ef.tar.gz
qemu-e22242141331bc829ecca194f5c06f674da618ef.tar.xz
qemu-e22242141331bc829ecca194f5c06f674da618ef.zip
smbus: add a smbus_eeprom_init_one() routine
This is an helper routine to add a single EEPROM on an I2C bus. It can be directly used by smbus_eeprom_init() which adds a certain number of EEPROMs on mips and x86 machines. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180530064049.27976-5-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i2c/smbus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/i2c/smbus.h b/include/hw/i2c/smbus.h
index cfe3fa69f3..4fdba022c1 100644
--- a/include/hw/i2c/smbus.h
+++ b/include/hw/i2c/smbus.h
@@ -76,6 +76,7 @@ int smbus_read_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data);
int smbus_write_block(I2CBus *bus, uint8_t addr, uint8_t command, uint8_t *data,
int len);
+void smbus_eeprom_init_one(I2CBus *smbus, uint8_t address, uint8_t *eeprom_buf);
void smbus_eeprom_init(I2CBus *smbus, int nb_eeprom,
const uint8_t *eeprom_spd, int size);