[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/38] hw/es1370.c: convert to PCIDeviceInfo to i
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v2 13/38] hw/es1370.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 18 May 2011 01:55:30 +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 v2 34/38] hw/vga-pci.c: convert to PCIDeviceInfo to initialize ids, (continued)
- [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
- [Qemu-devel] [PATCH v2 13/38] hw/es1370.c: convert to PCIDeviceInfo to initialize ids,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v2 35/38] hw/vt82c686.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 12/38] hw/e1000.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 25/38] hw/piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 02/38] usb-uhci: convert to PCIDEviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 03/38] eepro100: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 30/38] hw/sun4u.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- [Qemu-devel] [PATCH v2 17/38] hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/17
- Re: [Qemu-devel] [PATCH v2 00/38] pci: initialize ids in pci common code, Isaku Yamahata, 2011/05/17
- Re: [Qemu-devel] [PATCH v2 00/38] pci: initialize ids in pci common code, Michael S. Tsirkin, 2011/05/18