aboutsummaryrefslogtreecommitdiffstats
path: root/hw/piix4.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-05-25 10:58:22 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-06-12 10:33:36 +0300
commit146beee5d9f94d96ab3bf54ac355a263290b75ac (patch)
tree75551c6a04f240f9873da20b8780adce7dca5858 /hw/piix4.c
parentd7dccd11683d17e4658606349544312a0769ecea (diff)
hw/piix4.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/piix4.c')
-rw-r--r--hw/piix4.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/piix4.c b/hw/piix4.c
index 71f1f84dc..9590e7b14 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -86,15 +86,8 @@ static const VMStateDescription vmstate_piix4 = {
static int piix4_initfn(PCIDevice *dev)
{
PIIX4State *d = DO_UPCAST(PIIX4State, dev, dev);
- uint8_t *pci_conf;
isa_bus_new(&d->dev.qdev);
-
- pci_conf = d->dev.config;
- pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
- pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_0); // 82371AB/EB/MB PIIX4 PCI-to-ISA bridge
- pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA);
-
piix4_dev = &d->dev;
qemu_register_reset(piix4_reset, d);
return 0;
@@ -117,6 +110,9 @@ static PCIDeviceInfo piix4_info[] = {
.qdev.no_user = 1,
.no_hotplug = 1,
.init = piix4_initfn,
+ .vendor_id = PCI_VENDOR_ID_INTEL,
+ .device_id = PCI_DEVICE_ID_INTEL_82371AB_0, // 82371AB/EB/MB PIIX4 PCI-to-ISA bridge
+ .class_id = PCI_CLASS_BRIDGE_ISA,
},{
/* end of list */
}