[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 08/39] hw/ac97.c: convert to PCIDeviceInfo to ini
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 08/39] hw/ac97.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 25 May 2011 10:58:05 +0900 |
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/ac97.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index d71072d..c26a86d 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1281,9 +1281,6 @@ static int ac97_initfn (PCIDevice *dev)
AC97LinkState *s = DO_UPCAST (AC97LinkState, dev, dev);
uint8_t *c = s->dev.config;
- pci_config_set_vendor_id (c, PCI_VENDOR_ID_INTEL); /* ro */
- pci_config_set_device_id (c, PCI_DEVICE_ID_INTEL_82801AA_5); /* ro */
-
/* TODO: no need to override */
c[PCI_COMMAND] = 0x00; /* pcicmd pci command rw, ro */
c[PCI_COMMAND + 1] = 0x00;
@@ -1292,9 +1289,7 @@ static int ac97_initfn (PCIDevice *dev)
c[PCI_STATUS] = PCI_STATUS_FAST_BACK; /* pcists pci status rwc, ro */
c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_MEDIUM >> 8;
- c[PCI_REVISION_ID] = 0x01; /* rid revision ro */
c[PCI_CLASS_PROG] = 0x00; /* pi programming interface ro */
- pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO); /* ro */
/* TODO set when bar is registered. no need to override. */
/* nabmar native audio mixer base address rw */
@@ -1341,6 +1336,10 @@ static PCIDeviceInfo ac97_info = {
.qdev.size = sizeof (AC97LinkState),
.qdev.vmsd = &vmstate_ac97,
.init = ac97_initfn,
+ .vendor_id = PCI_VENDOR_ID_INTEL,
+ .device_id = PCI_DEVICE_ID_INTEL_82801AA_5,
+ .revision = 0x01,
+ .class_id = PCI_CLASS_MULTIMEDIA_AUDIO,
};
static void ac97_register (void)
--
1.7.1.1
- [Qemu-devel] [PATCH v3 15/39] hw/gt64xxx.c: convert to PCIDeviceInfo to initialize ids, (continued)
- [Qemu-devel] [PATCH v3 15/39] hw/gt64xxx.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 31/39] hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 36/39] hw/wdt_i6300esb.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 37/39] hw/xio3130_downstream.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 27/39] hw/qxl.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 23/39] hw/ne2000.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 28/39] hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 32/39] hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 38/39] hw/xio3130_upstream.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 05/39] apb_pci: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 08/39] hw/ac97.c: convert to PCIDeviceInfo to initialize ids,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 09/39] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 10/39] hw/bonito.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 02/39] usb-uhci: convert to PCIDEviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 39/39] virtio-pci.c: convert to PCIDEviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 35/39] hw/vt82c686.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 21/39] hw/ivshmem.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 34/39] hw/vga-pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 26/39] hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24