diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2010-06-25 11:09:07 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-07-06 10:36:28 -0500 |
commit | 0be71e324f774a77243f1a1487f468232d69542b (patch) | |
tree | f3ac4560e61b5874fd359da3ada9bd371c25efc4 /hw/stellaris.c | |
parent | 4f43c1ff3b8ce99de80db7c51423e5ba8b143802 (diff) | |
download | qemu-0be71e324f774a77243f1a1487f468232d69542b.zip qemu-0be71e324f774a77243f1a1487f468232d69542b.tar.gz qemu-0be71e324f774a77243f1a1487f468232d69542b.tar.bz2 |
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/stellaris.c')
-rw-r--r-- | hw/stellaris.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/stellaris.c b/hw/stellaris.c index 5755f8a..ccad134 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -354,7 +354,8 @@ static int stellaris_gptm_init(SysBusDevice *dev) s->opaque[0] = s->opaque[1] = s; s->timer[0] = qemu_new_timer(vm_clock, gptm_tick, &s->opaque[0]); s->timer[1] = qemu_new_timer(vm_clock, gptm_tick, &s->opaque[1]); - register_savevm("stellaris_gptm", -1, 1, gptm_save, gptm_load, s); + register_savevm(&dev->qdev, "stellaris_gptm", -1, 1, + gptm_save, gptm_load, s); return 0; } @@ -673,7 +674,7 @@ static int stellaris_sys_init(uint32_t base, qemu_irq irq, ssys_writefn, s); cpu_register_physical_memory(base, 0x00001000, iomemtype); ssys_reset(s); - register_savevm("stellaris_sys", -1, 1, ssys_save, ssys_load, s); + register_savevm(NULL, "stellaris_sys", -1, 1, ssys_save, ssys_load, s); return 0; } @@ -887,7 +888,7 @@ static int stellaris_i2c_init(SysBusDevice * dev) sysbus_init_mmio(dev, 0x1000, iomemtype); /* ??? For now we only implement the master interface. */ stellaris_i2c_reset(s); - register_savevm("stellaris_i2c", -1, 1, + register_savevm(&dev->qdev, "stellaris_i2c", -1, 1, stellaris_i2c_save, stellaris_i2c_load, s); return 0; } @@ -1196,7 +1197,7 @@ static int stellaris_adc_init(SysBusDevice *dev) sysbus_init_mmio(dev, 0x1000, iomemtype); stellaris_adc_reset(s); qdev_init_gpio_in(&dev->qdev, stellaris_adc_trigger, 1); - register_savevm("stellaris_adc", -1, 1, + register_savevm(&dev->qdev, "stellaris_adc", -1, 1, stellaris_adc_save, stellaris_adc_load, s); return 0; } @@ -1256,7 +1257,7 @@ static int stellaris_ssi_bus_init(SSISlave *dev) s->bus[1] = ssi_create_bus(&dev->qdev, "ssi1"); qdev_init_gpio_in(&dev->qdev, stellaris_ssi_bus_select, 1); - register_savevm("stellaris_ssi_bus", -1, 1, + register_savevm(&dev->qdev, "stellaris_ssi_bus", -1, 1, stellaris_ssi_bus_save, stellaris_ssi_bus_load, s); return 0; } |