[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 09/31] hw/i386/pc: No need for rtc_state to be an out-paramete
From: |
Bernhard Beschow |
Subject: |
[PATCH v5 09/31] hw/i386/pc: No need for rtc_state to be an out-parameter |
Date: |
Thu, 5 Jan 2023 15:32:06 +0100 |
Now that the RTC is created as part of the southbridges it doesn't need
to be an out-parameter any longer.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221022150508.26830-12-shentey@gmail.com>
---
include/hw/i386/pc.h | 2 +-
hw/i386/pc.c | 12 ++++++------
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 991f905f5d..dd059e8667 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -169,7 +169,7 @@ uint64_t pc_pci_hole64_start(void);
DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
void pc_basic_device_init(struct PCMachineState *pcms,
ISABus *isa_bus, qemu_irq *gsi,
- ISADevice **rtc_state,
+ ISADevice *rtc_state,
bool create_fdctrl,
uint32_t hpet_irqs);
void pc_cmos_init(PCMachineState *pcms,
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 448557333b..53a5443e09 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1251,7 +1251,7 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
void pc_basic_device_init(struct PCMachineState *pcms,
ISABus *isa_bus, qemu_irq *gsi,
- ISADevice **rtc_state,
+ ISADevice *rtc_state,
bool create_fdctrl,
uint32_t hpet_irqs)
{
@@ -1306,17 +1306,17 @@ void pc_basic_device_init(struct PCMachineState *pcms,
}
if (rtc_irq) {
- qdev_connect_gpio_out(DEVICE(*rtc_state), 0, rtc_irq);
+ qdev_connect_gpio_out(DEVICE(rtc_state), 0, rtc_irq);
} else {
- uint32_t irq = object_property_get_uint(OBJECT(*rtc_state),
+ uint32_t irq = object_property_get_uint(OBJECT(rtc_state),
"irq",
&error_fatal);
- isa_connect_gpio_out(*rtc_state, 0, irq);
+ isa_connect_gpio_out(rtc_state, 0, irq);
}
- object_property_add_alias(OBJECT(pcms), "rtc-time", OBJECT(*rtc_state),
+ object_property_add_alias(OBJECT(pcms), "rtc-time", OBJECT(rtc_state),
"date");
- qemu_register_boot_set(pc_boot_set, *rtc_state);
+ qemu_register_boot_set(pc_boot_set, rtc_state);
if (!xen_enabled() &&
(x86ms->pit == ON_OFF_AUTO_AUTO || x86ms->pit == ON_OFF_AUTO_ON)) {
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6bd8e70730..c9d6c3dac3 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -277,7 +277,7 @@ static void pc_init1(MachineState *machine,
}
/* init basic PC hardware */
- pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, true,
+ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, true,
0x4);
pc_nic_init(pcmc, isa_bus, pci_bus);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index da97df69f7..58c51fbd9e 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -293,7 +293,7 @@ static void pc_q35_init(MachineState *machine)
}
/* init basic PC hardware */
- pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, !mc->no_floppy,
+ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, rtc_state, !mc->no_floppy,
0xff0104);
/* connect pm stuff to lpc */
--
2.39.0
- [PATCH v5 01/31] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition, (continued)
- [PATCH v5 01/31] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition, Bernhard Beschow, 2023/01/05
- [PATCH v5 21/31] hw/isa/piix4: Make PIIX4's ACPI and USB functions optional, Bernhard Beschow, 2023/01/05
- [PATCH v5 06/31] hw/i386/pc_piix: Associate pci_map_irq_fn as soon as PCI bus is created, Bernhard Beschow, 2023/01/05
- [PATCH v5 26/31] hw/isa/piix3: Merge hw/isa/piix4.c, Bernhard Beschow, 2023/01/05
- [PATCH v5 25/31] hw/isa/piix4: Rename reset control operations to match PIIX3, Bernhard Beschow, 2023/01/05
- [PATCH v5 16/31] hw/isa/piix3: Wire up ACPI interrupt internally, Bernhard Beschow, 2023/01/05
- [PATCH v5 08/31] hw/i386/pc: Create RTC controllers in south bridges, Bernhard Beschow, 2023/01/05
- [PATCH v5 17/31] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2023/01/05
- [PATCH v5 02/31] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader, Bernhard Beschow, 2023/01/05
- [PATCH v5 07/31] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge, Bernhard Beschow, 2023/01/05
- [PATCH v5 09/31] hw/i386/pc: No need for rtc_state to be an out-parameter,
Bernhard Beschow <=
- [PATCH v5 28/31] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Bernhard Beschow, 2023/01/05
- [PATCH v5 19/31] hw/isa/piix3: Rename piix3_reset() for sharing with PIIX4, Bernhard Beschow, 2023/01/05
- [PATCH v5 15/31] hw/isa/piix3: Create IDE controller in host device, Bernhard Beschow, 2023/01/05
- [PATCH v5 10/31] hw/isa/piix3: Create USB controller in host device, Bernhard Beschow, 2023/01/05
- [PATCH v5 23/31] hw/isa/piix4: Use ISA PIC device, Bernhard Beschow, 2023/01/05
- [PATCH v5 24/31] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Bernhard Beschow, 2023/01/05
- [PATCH v5 27/31] hw/isa/piix: Harmonize names of reset control memory regions, Bernhard Beschow, 2023/01/05
- [PATCH v5 29/31] hw/isa/piix: Rename functions to be shared for interrupt triggering, Bernhard Beschow, 2023/01/05