[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/32] hw/i386/pc: No need for rtc_state to be an out-parameter
From: |
Bernhard Beschow |
Subject: |
[PATCH 08/32] hw/i386/pc: No need for rtc_state to be an out-parameter |
Date: |
Sun, 4 Dec 2022 20:05:29 +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>
Message-Id: <20221022150508.26830-12-shentey@gmail.com>
---
hw/i386/pc.c | 12 ++++++------
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
include/hw/i386/pc.h | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 9379cf4374..beb5f4d313 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1246,7 +1246,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)
{
@@ -1301,17 +1301,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 7de2f1092b..b97bff5674 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -262,7 +262,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 b5cd876dc2..c88f4448d9 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 */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index c95333514e..0cf3ccdf0d 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,
--
2.38.1
- [PATCH 01/32] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition, (continued)
- [PATCH 01/32] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition, Bernhard Beschow, 2022/12/04
- [PATCH 02/32] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader, Bernhard Beschow, 2022/12/04
- [PATCH 03/32] hw/isa/piix4: Correct IRQRC[A:D] reset values, Bernhard Beschow, 2022/12/04
- [PATCH 04/32] hw/mips/Kconfig: Track Malta's PIIX dependencies via Kconfig, Bernhard Beschow, 2022/12/04
- [PATCH 05/32] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge, Bernhard Beschow, 2022/12/04
- [PATCH 06/32] hw/usb/hcd-uhci: Introduce TYPE_ defines for device models, Bernhard Beschow, 2022/12/04
- [PATCH 07/32] hw/i386/pc: Create RTC controllers in south bridges, Bernhard Beschow, 2022/12/04
- [PATCH 08/32] hw/i386/pc: No need for rtc_state to be an out-parameter,
Bernhard Beschow <=
- [PATCH 09/32] hw/isa/piix3: Create USB controller in host device, Bernhard Beschow, 2022/12/04
- [PATCH 10/32] hw/isa/piix3: Create power management controller in host device, Bernhard Beschow, 2022/12/04
- [PATCH 11/32] hw/core: Introduce proxy-pic, Bernhard Beschow, 2022/12/04
- [PATCH 13/32] hw/isa/piix3: Create IDE controller in host device, Bernhard Beschow, 2022/12/04
- [PATCH 14/32] hw/isa/piix3: Wire up ACPI interrupt internally, Bernhard Beschow, 2022/12/04
- [PATCH 15/32] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2022/12/04
- [PATCH 16/32] hw/isa/piix3: Rename pci_piix3_props for sharing with PIIX4, Bernhard Beschow, 2022/12/04
- [PATCH 17/32] hw/isa/piix3: Rename piix3_reset() for sharing with PIIX4, Bernhard Beschow, 2022/12/04
- [PATCH 18/32] hw/isa/piix3: Prefix pci_slot_get_pirq() with "piix3_", Bernhard Beschow, 2022/12/04
- [PATCH 12/32] hw/isa/piix3: Create Proxy PIC in host device, Bernhard Beschow, 2022/12/04