diff options
author | Bernhard Beschow <shentey@gmail.com> | 2023-10-07 14:38:13 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-10-22 05:18:16 -0400 |
commit | 001cb25f3fb84768db4c1fb0ffd77779e0676745 (patch) | |
tree | f6e1c15abf2d5cb9c8422e8aabfeb829915d337b /hw/isa | |
parent | 32f29b26ff150dba6d1c455b826e44447b9ead45 (diff) |
hw/i386/pc_piix: Wire PIIX3's ISA interrupts by new "isa-irqs" property
Avoid assigning the private member of struct PIIX3State from outside which goes
against best QOM practices. Instead, implement best QOM practice by adding an
"isa-irqs" array property to TYPE_PIIX3_DEVICE and assign it in board code, i.e.
from outside.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20231007123843.127151-6-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/isa')
-rw-r--r-- | hw/isa/piix3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index 7240c91440..c17547a2c0 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -312,6 +312,8 @@ static void pci_piix3_init(Object *obj) { PIIX3State *d = PIIX3_PCI_DEVICE(obj); + qdev_init_gpio_out_named(DEVICE(obj), d->pic, "isa-irqs", ISA_NUM_IRQS); + object_initialize_child(obj, "rtc", &d->rtc, TYPE_MC146818_RTC); } |