提交 56fe6408 编写于 作者: I Isaku Yamahata 提交者: Michael S. Tsirkin

hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.
Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 a8eae585
......@@ -133,12 +133,8 @@ static int pci_realview_init(SysBusDevice *dev)
static int versatile_pci_host_init(PCIDevice *d)
{
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_XILINX);
/* Both boards have the same device ID. Oh well. */
pci_config_set_device_id(d->config, PCI_DEVICE_ID_XILINX_XC2VP30);
pci_set_word(d->config + PCI_STATUS,
PCI_STATUS_66MHZ | PCI_STATUS_DEVSEL_MEDIUM);
pci_config_set_class(d->config, PCI_CLASS_PROCESSOR_CO);
pci_set_byte(d->config + PCI_LATENCY_TIMER, 0x10);
return 0;
}
......@@ -147,6 +143,10 @@ static PCIDeviceInfo versatile_pci_host_info = {
.qdev.name = "versatile_pci_host",
.qdev.size = sizeof(PCIDevice),
.init = versatile_pci_host_init,
.vendor_id = PCI_VENDOR_ID_XILINX,
/* Both boards have the same device ID. Oh well. */
.device_id = PCI_DEVICE_ID_XILINX_XC2VP30,
.class_id = PCI_CLASS_PROCESSOR_CO,
};
static void versatile_pci_register_devices(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册