diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-09-01 18:36:53 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-10 15:29:28 +0200 |
commit | 7d6e771f49c36f4388798ce25bde1dede40cda74 (patch) | |
tree | 6c7ac7ed4d6266482ab98db18f0877e062fceb07 /hw/realview.c | |
parent | dd236a50aaf8817ab08ca346d6ace49ca4214c10 (diff) | |
download | qemu-7d6e771f49c36f4388798ce25bde1dede40cda74.zip qemu-7d6e771f49c36f4388798ce25bde1dede40cda74.tar.gz qemu-7d6e771f49c36f4388798ce25bde1dede40cda74.tar.bz2 |
hw/versatile_pci: Expose multiple sysbus mmio regions
Clean up versatile_pci to expose the various PCI mmio regions
properly as separate mmio regions rather than as a single mmio
which uses callbacks to map and unmap everything.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/realview.c')
-rw-r--r-- | hw/realview.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/realview.c b/hw/realview.c index 549bb15..11ffb8a 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -272,8 +272,16 @@ static void realview_init(ram_addr_t ram_size, sysbus_create_simple("pl031", 0x10017000, pic[10]); if (!is_pb) { - dev = sysbus_create_varargs("realview_pci", 0x60000000, - pic[48], pic[49], pic[50], pic[51], NULL); + dev = qdev_create(NULL, "realview_pci"); + busdev = sysbus_from_qdev(dev); + qdev_init_nofail(dev); + sysbus_mmio_map(busdev, 0, 0x61000000); /* PCI self-config */ + sysbus_mmio_map(busdev, 1, 0x62000000); /* PCI config */ + sysbus_mmio_map(busdev, 2, 0x63000000); /* PCI I/O */ + sysbus_connect_irq(busdev, 0, pic[48]); + sysbus_connect_irq(busdev, 1, pic[49]); + sysbus_connect_irq(busdev, 2, pic[50]); + sysbus_connect_irq(busdev, 3, pic[51]); pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci"); if (usb_enabled) { usb_ohci_init_pci(pci_bus, -1); |