summaryrefslogtreecommitdiff
path: root/hw/gt64xxx.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-07 17:31:35 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-07 17:31:35 +0000
commit1823082ccc32394fe2788b6b545fd080d60bb7e7 (patch)
treefb3d69ec4b9fb284e3926b2f58ef64a673e805fd /hw/gt64xxx.c
parent05b4ff435717e6b8355f6cd73ea17f2d9eaa9a55 (diff)
PCI device saving for GT64xxx.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2954 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/gt64xxx.c')
-rw-r--r--hw/gt64xxx.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 9f030263d3..76472df39b 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -945,6 +945,25 @@ static void gt64120_write_config(PCIDevice *d, uint32_t address, uint32_t val,
pci_default_write_config(d, address, val, len);
}
+static void gt64120_save(QEMUFile* f, void *opaque)
+{
+ PCIDevice *d = opaque;
+ pci_device_save(d, f);
+}
+
+static int gt64120_load(QEMUFile* f, void *opaque, int version_id)
+{
+ PCIDevice *d = opaque;
+ int ret;
+
+ if (version_id != 1)
+ return -EINVAL;
+ ret = pci_device_load(d, f);
+ if (ret < 0)
+ return ret;
+ return 0;
+}
+
PCIBus *pci_gt64120_init(qemu_irq *pic)
{
GT64120State *s;
@@ -988,5 +1007,7 @@ PCIBus *pci_gt64120_init(qemu_irq *pic)
d->config[0x27] = 0x14;
d->config[0x3D] = 0x01;
+ register_savevm("GT64120 PCI Bus", 0, 1, gt64120_save, gt64120_load, d);
+
return s->pci->bus;
}