aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
commit1ea96673c611cdc05ea32ac81f40d9f864e18507 (patch)
tree16a99607ac0c2aab3c3ea225eebe85beed8c96d0 /hw/pc.c
parentfd1eb2ea4286bb42ea4cf008ece14bbfbb598d21 (diff)
SMBus qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/pc.c b/hw/pc.c
index e227a22bdc..c07e7faddc 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1109,7 +1109,11 @@ static void pc_init1(ram_addr_t ram_size,
/* TODO: Populate SPD eeprom data. */
smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100, i8259[9]);
for (i = 0; i < 8; i++) {
- smbus_eeprom_device_init(smbus, 0x50 + i, eeprom_buf + (i * 256));
+ DeviceState *eeprom;
+ eeprom = qdev_create(smbus, "smbus-eeprom");
+ qdev_set_prop_int(eeprom, "address", 0x50 + i);
+ qdev_set_prop_ptr(eeprom, "data", eeprom_buf + (i * 256));
+ qdev_init(eeprom);
}
}