[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 31/39] hw/unin_pci.c: convert to PCIDeviceInfo to
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 31/39] hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids |
Date: |
Wed, 25 May 2011 10:58:28 +0900 |
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/unin_pci.c | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index c57c0a1..d364daa 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -279,10 +279,6 @@ PCIBus *pci_pmac_u3_init(qemu_irq *pic)
static int unin_main_pci_host_init(PCIDevice *d)
{
- pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
- pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_PCI);
- d->config[0x08] = 0x00; // revision
- pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0x08; // cache_line_size
d->config[0x0D] = 0x10; // latency_timer
d->config[0x34] = 0x00; // capabilities_pointer
@@ -291,10 +287,6 @@ static int unin_main_pci_host_init(PCIDevice *d)
static int unin_agp_pci_host_init(PCIDevice *d)
{
- pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
- pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_AGP);
- d->config[0x08] = 0x00; // revision
- pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0x08; // cache_line_size
d->config[0x0D] = 0x10; // latency_timer
// d->config[0x34] = 0x80; // capabilities_pointer
@@ -303,11 +295,6 @@ static int unin_agp_pci_host_init(PCIDevice *d)
static int u3_agp_pci_host_init(PCIDevice *d)
{
- pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
- pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_U3_AGP);
- /* revision */
- d->config[0x08] = 0x00;
- pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
/* cache line size */
d->config[0x0C] = 0x08;
/* latency timer */
@@ -317,10 +304,6 @@ static int u3_agp_pci_host_init(PCIDevice *d)
static int unin_internal_pci_host_init(PCIDevice *d)
{
- pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
- pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI);
- d->config[0x08] = 0x00; // revision
- pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0x08; // cache_line_size
d->config[0x0D] = 0x10; // latency_timer
d->config[0x34] = 0x00; // capabilities_pointer
@@ -331,24 +314,40 @@ static PCIDeviceInfo unin_main_pci_host_info = {
.qdev.name = "uni-north",
.qdev.size = sizeof(PCIDevice),
.init = unin_main_pci_host_init,
+ .vendor_id = PCI_VENDOR_ID_APPLE,
+ .device_id = PCI_DEVICE_ID_APPLE_UNI_N_PCI,
+ .revision = 0x00,
+ .class_id = PCI_CLASS_BRIDGE_HOST,
};
static PCIDeviceInfo u3_agp_pci_host_info = {
.qdev.name = "u3-agp",
.qdev.size = sizeof(PCIDevice),
.init = u3_agp_pci_host_init,
+ .vendor_id = PCI_VENDOR_ID_APPLE,
+ .device_id = PCI_DEVICE_ID_APPLE_U3_AGP,
+ .revision = 0x00,
+ .class_id = PCI_CLASS_BRIDGE_HOST,
};
static PCIDeviceInfo unin_agp_pci_host_info = {
.qdev.name = "uni-north-agp",
.qdev.size = sizeof(PCIDevice),
.init = unin_agp_pci_host_init,
+ .vendor_id = PCI_VENDOR_ID_APPLE,
+ .device_id = PCI_DEVICE_ID_APPLE_UNI_N_AGP,
+ .revision = 0x00,
+ .class_id = PCI_CLASS_BRIDGE_HOST,
};
static PCIDeviceInfo unin_internal_pci_host_info = {
.qdev.name = "uni-north-pci",
.qdev.size = sizeof(PCIDevice),
.init = unin_internal_pci_host_init,
+ .vendor_id = PCI_VENDOR_ID_APPLE,
+ .device_id = PCI_DEVICE_ID_APPLE_UNI_N_I_PCI,
+ .revision = 0x00,
+ .class_id = PCI_CLASS_BRIDGE_HOST,
};
static void unin_register_devices(void)
--
1.7.1.1
- [Qemu-devel] [PATCH v3 04/39] dec_pci: convert to PCIDeviceInfo to initialize ids, (continued)
- [Qemu-devel] [PATCH v3 04/39] dec_pci: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 03/39] eepro100: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 11/39] hw/cirrus_vga.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 33/39] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 24/39] hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 17/39] hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 25/39] hw/piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 29/39] hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [Qemu-devel] [PATCH v3 14/39] hw/grackle_pci.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24
- [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 <=
- [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, 2011/05/24
- [Qemu-devel] [PATCH v3 09/39] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids, Isaku Yamahata, 2011/05/24