diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2019-01-03 17:27:24 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-02-04 18:44:17 +1100 |
commit | b296b664abc732532afb732f1d02d22cae9c847a (patch) | |
tree | 6de0b5aae3ee7aba612272639f50dcb32c461434 /include/hw/i2c | |
parent | 583b28d45bf978832be024276fda8fdfe571c447 (diff) |
smbus: Add a helper to generate SPD EEPROM data
There are several boards with SPD EEPROMs that are now using
duplicated or slightly different hard coded data. Add a helper to
generate SPD data for a memory module of given type and size that
could be used by these boards (either as is or with further changes if
needed) which should help cleaning this up and avoid further duplication.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/i2c')
-rw-r--r-- | include/hw/i2c/smbus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/i2c/smbus.h b/include/hw/i2c/smbus.h index 5c61c05999..89dfea1a08 100644 --- a/include/hw/i2c/smbus.h +++ b/include/hw/i2c/smbus.h @@ -95,4 +95,7 @@ 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); +enum sdram_type { SDR = 0x4, DDR = 0x7, DDR2 = 0x8 }; +uint8_t *spd_data_generate(enum sdram_type type, ram_addr_t size, Error **errp); + #endif |