aboutsummaryrefslogtreecommitdiff
path: root/hw/lsi53c895a.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-05-25 10:58:19 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-06-12 10:33:35 +0300
commitaf5374aa044af8ebc5a7dd387ea0dec48b5d956b (patch)
treeb3789269a0d728f9a5d52ee27e9c0da86e7c31f9 /hw/lsi53c895a.c
parent7aff0f218cf623fbc4e2fe86c3ed8985ca3f2a9a (diff)
downloadqemu-af5374aa044af8ebc5a7dd387ea0dec48b5d956b.zip
qemu-af5374aa044af8ebc5a7dd387ea0dec48b5d956b.tar.gz
qemu-af5374aa044af8ebc5a7dd387ea0dec48b5d956b.tar.bz2
hw/lsi53c895a.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/lsi53c895a.c')
-rw-r--r--hw/lsi53c895a.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index be4df58..6b9c904 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -2212,15 +2212,6 @@ static int lsi_scsi_init(PCIDevice *dev)
pci_conf = s->dev.config;
- /* PCI Vendor ID (word) */
- pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_LSI_LOGIC);
- /* PCI device ID (word) */
- pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_LSI_53C895A);
- /* PCI base class code */
- pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_SCSI);
- /* PCI subsystem ID */
- pci_conf[PCI_SUBSYSTEM_ID] = 0x00;
- pci_conf[PCI_SUBSYSTEM_ID + 1] = 0x10;
/* PCI latency timer = 255 */
pci_conf[PCI_LATENCY_TIMER] = 0xff;
/* TODO: RST# value should be 0 */
@@ -2256,6 +2247,10 @@ static PCIDeviceInfo lsi_info = {
.qdev.vmsd = &vmstate_lsi_scsi,
.init = lsi_scsi_init,
.exit = lsi_scsi_uninit,
+ .vendor_id = PCI_VENDOR_ID_LSI_LOGIC,
+ .device_id = PCI_DEVICE_ID_LSI_53C895A,
+ .class_id = PCI_CLASS_STORAGE_SCSI,
+ .subsystem_id = 0x1000,
};
static void lsi53c895a_register_devices(void)