diff options
author | Bernhard Beschow <shentey@gmail.com> | 2022-10-03 22:31:36 +0200 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-10-17 16:15:09 -0300 |
commit | 9f6621bd161e95f4fe25c97bffc4f1a97a536138 (patch) | |
tree | cb64e16840ce5dba8bf1593e7cf4ba61136a9642 /hw/ppc/e500.c | |
parent | 47a0b1dff7e9c32808ca2c8a007a4dfa7bf273f1 (diff) | |
download | qemu-9f6621bd161e95f4fe25c97bffc4f1a97a536138.zip qemu-9f6621bd161e95f4fe25c97bffc4f1a97a536138.tar.gz qemu-9f6621bd161e95f4fe25c97bffc4f1a97a536138.tar.bz2 |
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>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r-- | hw/ppc/e500.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 496c61b..3e950ea 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -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); - - 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)); - } + 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); - 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! * |