[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/22] hw/ppc/pnv: Determine ns16550's IRQ number from QOM proper
From: |
Bernhard Beschow |
Subject: |
[PATCH 05/22] hw/ppc/pnv: Determine ns16550's IRQ number from QOM property |
Date: |
Tue, 22 Feb 2022 18:38:02 +0100 |
Determine the IRQ number in the same way as for isa-ipmi-bt. This resolves
the last usage of ISADevice::isairq[] which allows it to be removed.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/pnv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 837146a2fb..1e9f6b0690 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_int(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))));
--
2.35.1
- [PATCH 00/22] isa: Resolve unneeded IRQ attributes from ISADevice, Bernhard Beschow, 2022/02/22
- [PATCH 03/22] hw/input/pckbd: QOM'ify IRQ numbers, Bernhard Beschow, 2022/02/22
- [PATCH 01/22] hw/rtc/mc146818rtc: QOM'ify IRQ number, Bernhard Beschow, 2022/02/22
- [PATCH 02/22] hw/rtc/m48t59-isa: QOM'ify IRQ number, Bernhard Beschow, 2022/02/22
- [PATCH 06/22] isa: Drop unused attributes from ISADevice, Bernhard Beschow, 2022/02/22
- [PATCH 04/22] hw/isa/isa-bus: Remove isabus_dev_print(), Bernhard Beschow, 2022/02/22
- [PATCH 07/22] hw/audio/cs4231a: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 08/22] hw/audio/gus: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 09/22] hw/audio/sb16: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 05/22] hw/ppc/pnv: Determine ns16550's IRQ number from QOM property,
Bernhard Beschow <=
- [PATCH 10/22] hw/block/fdc-isa: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 11/22] hw/char/parallel: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 12/22] hw/char/serial-isa: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 13/22] hw/ide/isa: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 15/22] hw/ipmi/isa_ipmi_bt: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 16/22] hw/ipmi/isa_ipmi_kcs: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 17/22] hw/isa/piix4: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 14/22] hw/input/pckbd: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 18/22] hw/net/ne2000-isa: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22
- [PATCH 19/22] hw/rtc/m48t59-isa: Disuse isa_init_irq(), Bernhard Beschow, 2022/02/22