[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 26/38] hw/piix_pci.c: convert to PCIDeviceInfo to
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v2 26/38] hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 18 May 2011 01:55:43 +0900 |
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/piix_pci.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 5f0d92f..41ba15c 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -228,11 +228,6 @@ static int i440fx_initfn(PCIDevice *dev)
{
PCII440FXState *d = DO_UPCAST(PCII440FXState, dev, dev);
- pci_config_set_vendor_id(d->dev.config, PCI_VENDOR_ID_INTEL);
- pci_config_set_device_id(d->dev.config, PCI_DEVICE_ID_INTEL_82441);
- d->dev.config[0x08] = 0x02; // revision
- pci_config_set_class(d->dev.config, PCI_CLASS_BRIDGE_HOST);
-
d->dev.config[I440FX_SMRAM] = 0x02;
cpu_smm_register(&i440fx_set_smm, d);
@@ -406,15 +401,8 @@ static const VMStateDescription vmstate_piix3 = {
static int piix3_initfn(PCIDevice *dev)
{
PIIX3State *d = DO_UPCAST(PIIX3State, 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_82371SB_0); //
82371SB PIIX3 PCI-to-ISA bridge (Step A1)
- pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA);
-
qemu_register_reset(piix3_reset, d);
return 0;
}
@@ -429,6 +417,10 @@ static PCIDeviceInfo i440fx_info[] = {
.no_hotplug = 1,
.init = i440fx_initfn,
.config_write = i440fx_write_config,
+ .vendor_id = PCI_VENDOR_ID_INTEL,
+ .device_id = PCI_DEVICE_ID_INTEL_82441,
+ .revision = 0x02, // revision
+ .class_id = PCI_CLASS_BRIDGE_HOST,
},{
.qdev.name = "PIIX3",
.qdev.desc = "ISA bridge",
@@ -438,6 +430,9 @@ static PCIDeviceInfo i440fx_info[] = {
.no_hotplug = 1,
.init = piix3_initfn,
.config_write = piix3_write_config,
+ .vendor_id = PCI_VENDOR_ID_INTEL,
+ .device_id = PCI_DEVICE_ID_INTEL_82371SB_0, // 82371SB PIIX3
PCI-to-ISA bridge (Step A1)
+ .class_id = PCI_CLASS_BRIDGE_ISA,
},{
/* end of list */
}
--
1.7.1.1
- [Qemu-devel] [PATCH v2 08/38] hw/ac97.c: convert to PCIDeviceInfo to initialize ids, (continued)
- [Qemu-devel] [PATCH v2 08/38] hw/ac97.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 11/38] hw/cirrus_vga.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 36/38] hw/wdt_i6300esb.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 20/38] hw/ioh3420.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 05/38] apb_pci: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 23/38] hw/ne2000.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 28/38] hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 21/38] hw/ivshmem.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 32/38] hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 33/38] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 26/38] hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v2 34/38] hw/vga-pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 38/38] hw/xio3130_upstream.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 06/38] ide/piix: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 29/38] hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 27/38] hw/qxl.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 01/38] pci: move ids of config space into PCIDeviceInfo, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 31/38] hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 24/38] hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 16/38] hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 18/38] hw/ide/via.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17