diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-28 15:28:13 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-04 09:37:22 -0500 |
commit | 823e675a073be146a119bb9056ca9f02eb951448 (patch) | |
tree | fd1891c21c987a3a8f85498c7f43b5c855b1344f /hw/piix_pci.c | |
parent | a4bf1f3e17fe686159c050f8063a6c076f7ba8a2 (diff) | |
download | qemu-823e675a073be146a119bb9056ca9f02eb951448.zip qemu-823e675a073be146a119bb9056ca9f02eb951448.tar.gz qemu-823e675a073be146a119bb9056ca9f02eb951448.tar.bz2 |
Split piix4 support from piix_pci.c
Now mips_malta uses piix4 and pc's use piix_pci definitions
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index ad85eba..c78007a 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -224,7 +224,6 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic) /* PIIX3 PCI to ISA bridge */ static PCIDevice *piix3_dev; -PCIDevice *piix4_dev; static void piix3_set_irq(qemu_irq *pic, int irq_num, int level) { @@ -287,44 +286,6 @@ static void piix3_reset(void *opaque) memset(pci_irq_levels, 0, sizeof(pci_irq_levels)); } -static void piix4_reset(void *opaque) -{ - PCIDevice *d = opaque; - uint8_t *pci_conf = d->config; - - pci_conf[0x04] = 0x07; // master, memory and I/O - pci_conf[0x05] = 0x00; - pci_conf[0x06] = 0x00; - pci_conf[0x07] = 0x02; // PCI_status_devsel_medium - pci_conf[0x4c] = 0x4d; - pci_conf[0x4e] = 0x03; - pci_conf[0x4f] = 0x00; - pci_conf[0x60] = 0x0a; // PCI A -> IRQ 10 - pci_conf[0x61] = 0x0a; // PCI B -> IRQ 10 - pci_conf[0x62] = 0x0b; // PCI C -> IRQ 11 - pci_conf[0x63] = 0x0b; // PCI D -> IRQ 11 - pci_conf[0x69] = 0x02; - pci_conf[0x70] = 0x80; - pci_conf[0x76] = 0x0c; - pci_conf[0x77] = 0x0c; - pci_conf[0x78] = 0x02; - pci_conf[0x79] = 0x00; - pci_conf[0x80] = 0x00; - pci_conf[0x82] = 0x00; - pci_conf[0xa0] = 0x08; - pci_conf[0xa2] = 0x00; - pci_conf[0xa3] = 0x00; - pci_conf[0xa4] = 0x00; - pci_conf[0xa5] = 0x00; - pci_conf[0xa6] = 0x00; - pci_conf[0xa7] = 0x00; - pci_conf[0xa8] = 0x0f; - pci_conf[0xaa] = 0x00; - pci_conf[0xab] = 0x00; - pci_conf[0xac] = 0x00; - pci_conf[0xae] = 0x00; -} - static void piix_save(QEMUFile* f, void *opaque) { PCIDevice *d = opaque; @@ -359,25 +320,6 @@ static int piix3_initfn(PCIDevice *d) return 0; } -static int piix4_initfn(PCIDevice *d) -{ - uint8_t *pci_conf; - - register_savevm("PIIX4", 0, 2, piix_save, piix_load, d); - - pci_conf = d->config; - pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_0); // 82371AB/EB/MB PIIX4 PCI-to-ISA bridge - pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA); - pci_conf[PCI_HEADER_TYPE] = - PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION; // header_type = PCI_multifunction, generic - - piix4_dev = d; - piix4_reset(d); - qemu_register_reset(piix4_reset, d); - return 0; -} - int piix3_init(PCIBus *bus, int devfn) { PCIDevice *d; @@ -386,14 +328,6 @@ int piix3_init(PCIBus *bus, int devfn) return d->devfn; } -int piix4_init(PCIBus *bus, int devfn) -{ - PCIDevice *d; - - d = pci_create_simple(bus, devfn, "PIIX4"); - return d->devfn; -} - static PCIDeviceInfo i440fx_info[] = { { .qdev.name = "i440FX", @@ -409,12 +343,6 @@ static PCIDeviceInfo i440fx_info[] = { .qdev.no_user = 1, .init = piix3_initfn, },{ - .qdev.name = "PIIX4", - .qdev.desc = "ISA bridge", - .qdev.size = sizeof(PCIDevice), - .qdev.no_user = 1, - .init = piix4_initfn, - },{ /* end of list */ } }; |