[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 13/39] hw/es1370.c: convert to PCIDeviceInfo to i
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 13/39] hw/es1370.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 25 May 2011 10:58:10 +0900 |
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/es1370.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/hw/es1370.c b/hw/es1370.c
index 40cb48c..1ed62b7 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
@@ -998,21 +998,9 @@ static int es1370_initfn (PCIDevice *dev)
ES1370State *s = DO_UPCAST (ES1370State, dev, dev);
uint8_t *c = s->dev.config;
- pci_config_set_vendor_id (c, PCI_VENDOR_ID_ENSONIQ);
- pci_config_set_device_id (c, PCI_DEVICE_ID_ENSONIQ_ES1370);
c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_SLOW >> 8;
- pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO);
-#if 1
- c[PCI_SUBSYSTEM_VENDOR_ID] = 0x42;
- c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x49;
- c[PCI_SUBSYSTEM_ID] = 0x4c;
- c[PCI_SUBSYSTEM_ID + 1] = 0x4c;
-#else
- c[PCI_SUBSYSTEM_VENDOR_ID] = 0x74;
- c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x12;
- c[PCI_SUBSYSTEM_ID] = 0x71;
- c[PCI_SUBSYSTEM_ID + 1] = 0x13;
+#if 0
c[PCI_CAPABILITY_LIST] = 0xdc;
c[PCI_INTERRUPT_LINE] = 10;
c[0xdc] = 0x00;
@@ -1043,6 +1031,16 @@ static PCIDeviceInfo es1370_info = {
.qdev.size = sizeof (ES1370State),
.qdev.vmsd = &vmstate_es1370,
.init = es1370_initfn,
+ .vendor_id = PCI_VENDOR_ID_ENSONIQ,
+ .device_id = PCI_DEVICE_ID_ENSONIQ_ES1370,
+ .class_id = PCI_CLASS_MULTIMEDIA_AUDIO,
+#if 1
+ .subsystem_vendor_id = 0x4942,
+ .subsystem_id = 0x4c4c,
+#else
+ .subsystem_vendor_id = 0x1274,
+ .subsystem_id = 0x1371,
+#endif
};
static void es1370_register (void)
--
1.7.1.1
- [Qemu-devel] [PATCH v3 00/39] pci: initialize ids in pci common code, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 13/39] hw/es1370.c: convert to PCIDeviceInfo to initialize ids,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 20/39] hw/ioh3420.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 01/39] pci: move ids of config space into PCIDeviceInfo, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 18/39] hw/ide/via.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 16/39] hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 22/39] hw/lsi53c895a.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 07/39] vmware_vga.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 12/39] hw/e1000.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 06/39] ide/piix: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 30/39] hw/sun4u.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 19/39] hw/intel-hda.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24