[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 16/23] hw/isa/piix4: Create the "intr" property during init()
From: |
Bernhard Beschow |
Subject: |
[PATCH v7 16/23] hw/isa/piix4: Create the "intr" property during init() already |
Date: |
Sun, 12 Feb 2023 13:37:58 +0100 |
Only PIIX4 provides this property while PIIX3 doesn't.
Unlike initialize() methods, init() methods allow for device-specific
quirks without having to call the parent method. So move the creation of
the property into PIIX4's init() method as a preparation of the code
merge and the subsequent cleanup of the realize methods.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/piix4.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index df22c81cc2..7d4a66af49 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -176,9 +176,6 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
return;
}
- qdev_init_gpio_out_named(DEVICE(dev), &s->cpu_intr,
- "intr", 1);
-
memory_region_init_io(&s->rcr_mem, OBJECT(dev), &piix4_rcr_ops, s,
"reset-control", 1);
memory_region_add_subregion_overlap(pci_address_space_io(dev),
@@ -239,6 +236,8 @@ static void piix4_init(Object *obj)
{
PIIXState *s = PIIX_PCI_DEVICE(obj);
+ qdev_init_gpio_out_named(DEVICE(obj), &s->cpu_intr, "intr", 1);
+
object_initialize_child(obj, "rtc", &s->rtc, TYPE_MC146818_RTC);
object_initialize_child(obj, "ide", &s->ide, TYPE_PIIX4_IDE);
}
--
2.39.1
- [PATCH v7 00/23] Consolidate PIIX south bridges, Bernhard Beschow, 2023/02/12
- [PATCH v7 01/23] hw/i386/pc: Create RTC controllers in south bridges, Bernhard Beschow, 2023/02/12
- [PATCH v7 05/23] hw/isa/piix3: Create power management controller in host device, Bernhard Beschow, 2023/02/12
- [PATCH v7 11/23] hw/isa/piix3: Rename piix3_reset() for sharing with PIIX4, Bernhard Beschow, 2023/02/12
- [PATCH v7 07/23] hw/isa/piix3: Create IDE controller in host device, Bernhard Beschow, 2023/02/12
- [PATCH v7 03/23] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge, Bernhard Beschow, 2023/02/12
- [PATCH v7 16/23] hw/isa/piix4: Create the "intr" property during init() already,
Bernhard Beschow <=
- [PATCH v7 14/23] hw/isa/piix4: Remove unused inbound ISA interrupt lines, Bernhard Beschow, 2023/02/12
- [PATCH v7 10/23] hw/isa/piix3: Rename pci_piix3_props for sharing with PIIX4, Bernhard Beschow, 2023/02/12
- [PATCH v7 09/23] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2023/02/12
- [PATCH v7 20/23] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Bernhard Beschow, 2023/02/12
- [PATCH v7 21/23] hw/isa/piix: Rename functions to be shared for interrupt triggering, Bernhard Beschow, 2023/02/12
- [PATCH v7 04/23] hw/isa/piix3: Create USB controller in host device, Bernhard Beschow, 2023/02/12
- [PATCH v7 08/23] hw/isa/piix3: Wire up ACPI interrupt internally, Bernhard Beschow, 2023/02/12
- [PATCH v7 17/23] hw/isa/piix4: Rename reset control operations to match PIIX3, Bernhard Beschow, 2023/02/12
- [PATCH v7 22/23] hw/isa/piix: Consolidate IRQ triggering, Bernhard Beschow, 2023/02/12
- [PATCH v7 18/23] hw/isa/piix3: Merge hw/isa/piix4.c, Bernhard Beschow, 2023/02/12