aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2018-03-06 20:30:57 +0000
committerDavid Gibson <david@gibson.dropbear.id.au>2018-04-27 18:05:22 +1000
commit8ce3f743c78f422ff87da76553c9421391f3adbf (patch)
tree584d7c4be54f61e5b2ab9028049de52bc3d421dd /hw/pci-host
parent7b19318bee746628b8cd9795d7a944c26779d60f (diff)
uninorth: remove obsolete pci_pmac_u3_init() function
Instead wire up the PCI/AGP host bridges in mac_newworld.c. Now this is complete it is possible to move the initialisation of the PCI hole alias into pci_u3_agp_init(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/uninorth.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 8e4e9b3d35..ec6e529d66 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -185,8 +185,13 @@ static void pci_u3_agp_init(Object *obj)
memory_region_init(&s->pci_mmio, OBJECT(s), "unin-pci-mmio",
0x100000000ULL);
+ memory_region_init_alias(&s->pci_hole, OBJECT(s),
+ "unin-pci-hole", &s->pci_mmio,
+ 0x80000000ULL, 0x70000000ULL);
+
sysbus_init_mmio(sbd, &h->conf_mem);
sysbus_init_mmio(sbd, &h->data_mem);
+ sysbus_init_mmio(sbd, &s->pci_hole);
}
static void pci_unin_agp_realize(DeviceState *dev, Error **errp)
@@ -247,31 +252,6 @@ static void pci_unin_internal_init(Object *obj)
sysbus_init_mmio(sbd, &h->data_mem);
}
-UNINState *pci_pmac_u3_init(qemu_irq *pic,
- MemoryRegion *address_space_mem)
-{
- DeviceState *dev;
- SysBusDevice *s;
- UNINState *d;
-
- /* Uninorth AGP bus */
- dev = qdev_create(NULL, TYPE_U3_AGP_HOST_BRIDGE);
- qdev_prop_set_ptr(dev, "pic-irqs", pic);
- qdev_init_nofail(dev);
- s = SYS_BUS_DEVICE(dev);
- d = U3_AGP_HOST_BRIDGE(dev);
-
- memory_region_init_alias(&d->pci_hole, OBJECT(d), "pci-hole", &d->pci_mmio,
- 0x80000000ULL, 0x70000000ULL);
- memory_region_add_subregion(address_space_mem, 0x80000000ULL,
- &d->pci_hole);
-
- sysbus_mmio_map(s, 0, 0xf0800000);
- sysbus_mmio_map(s, 1, 0xf0c00000);
-
- return d;
-}
-
static void unin_main_pci_host_realize(PCIDevice *d, Error **errp)
{
/* cache_line_size */