@@ -107,17 +107,6 @@ static I2CBus *npcm7xx_i2c_get_bus(NPCM7xxState *soc, uint32_t num)
return I2C_BUS(qdev_get_child_bus(DEVICE(&soc->smbus[num]), "i2c-bus"));
}
-static void at24c_eeprom_init(NPCM7xxState *soc, int bus, uint8_t addr,
- uint32_t rsize)
-{
- I2CBus *i2c_bus = npcm7xx_i2c_get_bus(soc, bus);
- I2CSlave *i2c_dev = i2c_slave_new("at24c-eeprom", addr);
- DeviceState *dev = DEVICE(i2c_dev);
-
- qdev_prop_set_uint32(dev, "rom-size", rsize);
- i2c_slave_realize_and_unref(i2c_dev, i2c_bus, &error_abort);
-}
-
static void npcm7xx_init_pwm_splitter(NPCM7xxMachine *machine,
NPCM7xxState *soc, const int *fan_counts)
{
@@ -220,8 +209,8 @@ static void quanta_gsj_i2c_init(NPCM7xxState *soc)
i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 3), "tmp105", 0x5c);
i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 4), "tmp105", 0x5c);
- at24c_eeprom_init(soc, 9, 0x55, 8192);
- at24c_eeprom_init(soc, 10, 0x55, 8192);
+ at24c_eeprom_init_one(npcm7xx_i2c_get_bus(soc, 9), 9, 0x55, 8192, 0);
+ at24c_eeprom_init_one(npcm7xx_i2c_get_bus(soc, 10), 10, 0x55, 8192, 1);
/*
* i2c-11: