[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 10/19] uninorth: fix PCI and AGP bus mixup
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-ppc] [PATCH 10/19] uninorth: fix PCI and AGP bus mixup |
Date: |
Tue, 6 Mar 2018 20:30:54 +0000 |
Somewhere in the history of time, the initialisation of the PCI buses for the
AGP and PCI host bridges got mixed up in that the PCI host bridge was
creating an instance of the AGP PCI bus, and the AGP PCI bus was missing.
Swap the PCI host bridge over to use the correct PCI bus (including setting
the kMacRISCPCIAddressSelect register used by MacOS X) and add the missing
reference to the AGP PCI bus.
Signed-off-by: Mark Cave-Ayland <address@hidden>
---
hw/pci-host/uninorth.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 426b3c4e33..1f6752c294 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -121,7 +121,7 @@ static void pci_unin_main_realize(DeviceState *dev, Error
**errp)
get_system_io(),
PCI_DEVFN(11, 0), 4, TYPE_PCI_BUS);
- pci_create_simple(h->bus, PCI_DEVFN(11, 0), "uni-north-agp");
+ pci_create_simple(h->bus, PCI_DEVFN(11, 0), "uni-north-pci");
/* DEC 21154 bridge */
#if 0
@@ -195,6 +195,8 @@ static void pci_unin_agp_realize(DeviceState *dev, Error
**errp)
&s->pci_mmio,
get_system_io(),
PCI_DEVFN(11, 0), 4, TYPE_PCI_BUS);
+
+ pci_create_simple(h->bus, PCI_DEVFN(11, 0), "uni-north-agp");
}
static void pci_unin_agp_init(Object *obj)
@@ -303,16 +305,6 @@ static void unin_main_pci_host_realize(PCIDevice *d, Error
**errp)
d->config[0x0D] = 0x10;
/* capabilities_pointer */
d->config[0x34] = 0x00;
-}
-
-static void unin_agp_pci_host_realize(PCIDevice *d, Error **errp)
-{
- /* cache_line_size */
- d->config[0x0C] = 0x08;
- /* latency_timer */
- d->config[0x0D] = 0x10;
- /* capabilities_pointer
- d->config[0x34] = 0x80; */
/*
* Set kMacRISCPCIAddressSelect (0x48) register to indicate PCI
@@ -325,6 +317,16 @@ static void unin_agp_pci_host_realize(PCIDevice *d, Error
**errp)
d->config[0x4b] = 0x1;
}
+static void unin_agp_pci_host_realize(PCIDevice *d, Error **errp)
+{
+ /* cache_line_size */
+ d->config[0x0C] = 0x08;
+ /* latency_timer */
+ d->config[0x0D] = 0x10;
+ /* capabilities_pointer
+ d->config[0x34] = 0x80; */
+}
+
static void u3_agp_pci_host_realize(PCIDevice *d, Error **errp)
{
/* cache line size */
--
2.11.0
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 07/19] uninorth: move PCI mmio memory region initialisation into init function, (continued)
[Qemu-ppc] [PATCH 08/19] uninorth: introduce temporary pic_irqs device property, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 09/19] uninorth: move PCI host bridge bus initialisation into device realize, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 19/19] mac_newworld: move wiring of macio IRQs to macio_newworld_realize(), Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 14/19] uninorth: use object link to pass OpenPIC object to uninorth, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 13/19] uninorth: remove obsolete pci_pmac_u3_init() function, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 10/19] uninorth: fix PCI and AGP bus mixup,
Mark Cave-Ayland <=
[Qemu-ppc] [PATCH 12/19] uninorth: remove obsolete pci_pmac_init() function, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 11/19] uninorth: enable internal PCI host bridge, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 16/19] uninorth: rename UNINState to UNINHostState, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 18/19] mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 15/19] uninorth: move PCI IO (ISA) memory region into the uninorth device, Mark Cave-Ayland, 2018/03/06
[Qemu-ppc] [PATCH 17/19] uninorth: create new uninorth device, Mark Cave-Ayland, 2018/03/06