|
@@ -26,7 +26,6 @@
|
|
|
#include "qapi/error.h"
|
|
|
#include "qemu/units.h"
|
|
|
#include "qemu/log.h"
|
|
|
-#include "hw/mips/mips.h"
|
|
|
#include "hw/pci/pci.h"
|
|
|
#include "hw/pci/pci_host.h"
|
|
|
#include "migration/vmstate.h"
|
|
@@ -1151,30 +1150,18 @@ static void gt64120_reset(DeviceState *dev)
|
|
|
static void gt64120_realize(DeviceState *dev, Error **errp)
|
|
|
{
|
|
|
GT64120State *s = GT64120_PCI_HOST_BRIDGE(dev);
|
|
|
+ PCIHostState *phb = PCI_HOST_BRIDGE(dev);
|
|
|
|
|
|
memory_region_init_io(&s->ISD_mem, OBJECT(dev), &isd_mem_ops, s,
|
|
|
"gt64120-isd", 0x1000);
|
|
|
-}
|
|
|
-
|
|
|
-PCIBus *gt64120_register(void)
|
|
|
-{
|
|
|
- GT64120State *d;
|
|
|
- PCIHostState *phb;
|
|
|
- DeviceState *dev;
|
|
|
-
|
|
|
- dev = qdev_new(TYPE_GT64120_PCI_HOST_BRIDGE);
|
|
|
- d = GT64120_PCI_HOST_BRIDGE(dev);
|
|
|
- phb = PCI_HOST_BRIDGE(dev);
|
|
|
- memory_region_init(&d->pci0_mem, OBJECT(dev), "pci0-mem", 4 * GiB);
|
|
|
- address_space_init(&d->pci0_mem_as, &d->pci0_mem, "pci0-mem");
|
|
|
+ memory_region_init(&s->pci0_mem, OBJECT(dev), "pci0-mem", 4 * GiB);
|
|
|
+ address_space_init(&s->pci0_mem_as, &s->pci0_mem, "pci0-mem");
|
|
|
phb->bus = pci_root_bus_new(dev, "pci",
|
|
|
- &d->pci0_mem,
|
|
|
+ &s->pci0_mem,
|
|
|
get_system_io(),
|
|
|
PCI_DEVFN(18, 0), TYPE_PCI_BUS);
|
|
|
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
|
|
|
|
|
pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "gt64120_pci");
|
|
|
- return phb->bus;
|
|
|
}
|
|
|
|
|
|
static void gt64120_pci_realize(PCIDevice *d, Error **errp)
|