mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
583b28d45b
commit
b296b664ab
2 changed files with 132 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue