hw/ppc/e500: Remove if statement which is now always true
Now that the MPC8544DS board also has a platform bus, the if statement is always true. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20221003203142.24355-8-shentey@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
47a0b1dff7
commit
9f6621bd16
@ -1007,25 +1007,23 @@ void ppce500_init(MachineState *machine)
|
||||
}
|
||||
|
||||
/* Platform Bus Device */
|
||||
if (pmc->has_platform_bus) {
|
||||
dev = qdev_new(TYPE_PLATFORM_BUS_DEVICE);
|
||||
dev->id = g_strdup(TYPE_PLATFORM_BUS_DEVICE);
|
||||
qdev_prop_set_uint32(dev, "num_irqs", pmc->platform_bus_num_irqs);
|
||||
qdev_prop_set_uint32(dev, "mmio_size", pmc->platform_bus_size);
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
||||
pms->pbus_dev = PLATFORM_BUS_DEVICE(dev);
|
||||
dev = qdev_new(TYPE_PLATFORM_BUS_DEVICE);
|
||||
dev->id = g_strdup(TYPE_PLATFORM_BUS_DEVICE);
|
||||
qdev_prop_set_uint32(dev, "num_irqs", pmc->platform_bus_num_irqs);
|
||||
qdev_prop_set_uint32(dev, "mmio_size", pmc->platform_bus_size);
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
||||
pms->pbus_dev = PLATFORM_BUS_DEVICE(dev);
|
||||
|
||||
s = SYS_BUS_DEVICE(pms->pbus_dev);
|
||||
for (i = 0; i < pmc->platform_bus_num_irqs; i++) {
|
||||
int irqn = pmc->platform_bus_first_irq + i;
|
||||
sysbus_connect_irq(s, i, qdev_get_gpio_in(mpicdev, irqn));
|
||||
}
|
||||
|
||||
memory_region_add_subregion(address_space_mem,
|
||||
pmc->platform_bus_base,
|
||||
&pms->pbus_dev->mmio);
|
||||
s = SYS_BUS_DEVICE(pms->pbus_dev);
|
||||
for (i = 0; i < pmc->platform_bus_num_irqs; i++) {
|
||||
int irqn = pmc->platform_bus_first_irq + i;
|
||||
sysbus_connect_irq(s, i, qdev_get_gpio_in(mpicdev, irqn));
|
||||
}
|
||||
|
||||
memory_region_add_subregion(address_space_mem,
|
||||
pmc->platform_bus_base,
|
||||
&pms->pbus_dev->mmio);
|
||||
|
||||
/*
|
||||
* Smart firmware defaults ahead!
|
||||
*
|
||||
|
@ -27,7 +27,6 @@ struct PPCE500MachineClass {
|
||||
|
||||
int mpic_version;
|
||||
bool has_mpc8xxx_gpio;
|
||||
bool has_platform_bus;
|
||||
hwaddr platform_bus_base;
|
||||
hwaddr platform_bus_size;
|
||||
int platform_bus_first_irq;
|
||||
|
@ -86,7 +86,6 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
|
||||
pmc->fixup_devtree = e500plat_fixup_devtree;
|
||||
pmc->mpic_version = OPENPIC_MODEL_FSL_MPIC_42;
|
||||
pmc->has_mpc8xxx_gpio = true;
|
||||
pmc->has_platform_bus = true;
|
||||
pmc->platform_bus_base = 0xf00000000ULL;
|
||||
pmc->platform_bus_size = 128 * MiB;
|
||||
pmc->platform_bus_first_irq = 5;
|
||||
|
@ -46,7 +46,6 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, void *data)
|
||||
pmc->pci_nr_slots = 2;
|
||||
pmc->fixup_devtree = mpc8544ds_fixup_devtree;
|
||||
pmc->mpic_version = OPENPIC_MODEL_FSL_MPIC_20;
|
||||
pmc->has_platform_bus = true;
|
||||
pmc->platform_bus_base = 0xFF800000ULL;
|
||||
pmc->platform_bus_size = 8 * MiB;
|
||||
pmc->platform_bus_first_irq = 5;
|
||||
|
Loading…
Reference in New Issue
Block a user