summaryrefslogtreecommitdiffstats
path: root/hw/ppc
diff options
context:
space:
mode:
authorBernhard Beschow2022-03-02 06:51:36 +0100
committerCédric Le Goater2022-03-02 06:51:36 +0100
commit632fc0b3cee4d519e24af045edb180dc9eca3f69 (patch)
treeaa57910a9d0bcb1dbf26dee4b16a06219c02fb24 /hw/ppc
parentMerge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20220228' into... (diff)
downloadqemu-632fc0b3cee4d519e24af045edb180dc9eca3f69.tar.gz
qemu-632fc0b3cee4d519e24af045edb180dc9eca3f69.tar.xz
qemu-632fc0b3cee4d519e24af045edb180dc9eca3f69.zip
hw/ppc/pnv: Determine ns16550's IRQ number from QOM property
Determine the IRQ number in the same way as for pnv_dt_ipmi_bt(). This resolves one usage of ISADevice::isairq[] which allows it to be removed eventually. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220301220037.76555-6-shentey@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/pnv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 837146a2fb..441bf958ca 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -380,9 +380,12 @@ static void pnv_dt_serial(ISADevice *d, void *fdt, int lpc_off)
cpu_to_be32(io_base),
cpu_to_be32(8)
};
+ uint32_t irq;
char *name;
int node;
+ irq = object_property_get_uint(OBJECT(d), "irq", &error_fatal);
+
name = g_strdup_printf("%s@i%x", qdev_fw_name(DEVICE(d)), io_base);
node = fdt_add_subnode(fdt, lpc_off, name);
_FDT(node);
@@ -394,7 +397,7 @@ static void pnv_dt_serial(ISADevice *d, void *fdt, int lpc_off)
_FDT((fdt_setprop_cell(fdt, node, "clock-frequency", 1843200)));
_FDT((fdt_setprop_cell(fdt, node, "current-speed", 115200)));
- _FDT((fdt_setprop_cell(fdt, node, "interrupts", d->isairq[0])));
+ _FDT((fdt_setprop_cell(fdt, node, "interrupts", irq)));
_FDT((fdt_setprop_cell(fdt, node, "interrupt-parent",
fdt_get_phandle(fdt, lpc_off))));