From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [PULL 34/39] mc146818rtc: always register rtc to rtc list
Date: Thu, 24 Oct 2019 16:03:50 +0200 [thread overview]
Message-ID: <1571925835-31930-35-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1571925835-31930-1-git-send-email-pbonzini@redhat.com>
From: Hervé Poussineau <hpoussin@reactos.org>
We are not required anymore to use rtc_init() function.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Message-Id: <20171216090228.28505-5-hpoussin@reactos.org>
[PMD: rebased, fix OBJECT() value]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191018133547.10936-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/timer/mc146818rtc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index dce4dae..0d7784b 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -964,17 +964,16 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
object_property_add_tm(OBJECT(s), "date", rtc_get_date, NULL);
qdev_init_gpio_out(dev, &s->irq, 1);
+ QLIST_INSERT_HEAD(&rtc_devices, s, link);
}
ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
{
DeviceState *dev;
ISADevice *isadev;
- RTCState *s;
isadev = isa_create(bus, TYPE_MC146818_RTC);
dev = DEVICE(isadev);
- s = MC146818_RTC(isadev);
qdev_prop_set_int32(dev, "base_year", base_year);
qdev_init_nofail(dev);
if (intercept_irq) {
@@ -982,9 +981,8 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
} else {
isa_connect_gpio_out(isadev, 0, RTC_ISA_IRQ);
}
- QLIST_INSERT_HEAD(&rtc_devices, s, link);
- object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(s),
+ object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(isadev),
"date", NULL);
return isadev;
@@ -1016,8 +1014,6 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
dc->reset = rtc_resetdev;
dc->vmsd = &vmstate_rtc;
dc->props = mc146818rtc_properties;
- /* Reason: needs to be wired up by rtc_init() */
- dc->user_creatable = false;
}
static const TypeInfo mc146818rtc_info = {
--
1.8.3.1
next prev parent reply other threads:[~2019-10-24 14:25 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 14:03 [PULL 00/39] Misc (mostly x86) patches for 2019-10-24 Paolo Bonzini
2019-10-24 14:03 ` [PULL 01/39] target/i386: log MCE guest and host addresses Paolo Bonzini
2019-10-24 14:03 ` [PULL 02/39] mc146818rtc: fix timer interrupt reinjection Paolo Bonzini
2019-10-24 14:03 ` [PULL 03/39] Updated Bulgarian translation (19) - 4.1.0 Paolo Bonzini
2019-10-24 19:54 ` Aleksandar Markovic
2019-10-24 20:19 ` Paolo Bonzini
2019-10-24 14:03 ` [PULL 04/39] i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment Paolo Bonzini
2019-10-24 14:03 ` [PULL 05/39] Do not use %m in common code to print error messages Paolo Bonzini
2019-10-24 14:03 ` [PULL 06/39] memory-device: simplify Makefile.objs conditions Paolo Bonzini
2019-10-24 14:03 ` [PULL 07/39] hw/virtio: Factorize virtio-mmio headers Paolo Bonzini
2019-10-24 14:03 ` [PULL 08/39] hw/i386/pc: rename functions shared with non-PC machines Paolo Bonzini
2019-10-24 14:03 ` [PULL 09/39] hw/i386/pc: fix code style issues on functions that will be moved out Paolo Bonzini
2019-10-24 14:03 ` [PULL 10/39] hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux() Paolo Bonzini
2019-10-24 14:03 ` [PULL 11/39] hw/i386/pc: avoid an assignment in if condition " Paolo Bonzini
2019-10-24 14:03 ` [PULL 12/39] hw/i386/pc: remove commented out code from x86_load_linux() Paolo Bonzini
2019-10-24 14:03 ` [PULL 13/39] hw/i386/pc: move shared x86 functions to x86.c and export them Paolo Bonzini
2019-10-24 14:03 ` [PULL 14/39] hw/i386: split PCMachineState deriving X86MachineState from it Paolo Bonzini
2019-10-24 14:03 ` [PULL 15/39] hw/i386: make x86.c independent from PCMachineState Paolo Bonzini
2019-10-24 14:03 ` [PULL 16/39] fw_cfg: add "modify" functions for all types Paolo Bonzini
2019-10-24 14:03 ` [PULL 17/39] hw/intc/apic: reject pic ints if isa_pic == NULL Paolo Bonzini
2019-10-24 14:03 ` [PULL 18/39] roms: add microvm-bios (qboot) as binary and git submodule Paolo Bonzini
2019-10-24 14:03 ` [PULL 19/39] docs/microvm.rst: document the new microvm machine type Paolo Bonzini
2019-10-24 14:03 ` [PULL 20/39] hw/i386: Introduce the " Paolo Bonzini
2019-11-12 10:18 ` Peter Maydell
2019-11-12 11:57 ` Sergio Lopez
2019-10-24 14:03 ` [PULL 21/39] MAINTAINERS: add microvm related files Paolo Bonzini
2019-10-24 14:03 ` [PULL 22/39] checkpatch: suggest qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE) Paolo Bonzini
2019-10-24 14:03 ` [PULL 23/39] runstate: ignore exit request in finish migrate state Paolo Bonzini
2019-10-24 14:03 ` [PULL 24/39] hw/timer/mc146818rtc: Only include qapi-commands-misc on I386 Paolo Bonzini
2019-10-24 14:03 ` [PULL 25/39] x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE Paolo Bonzini
2019-10-24 14:03 ` [PULL 26/39] target/i386: Add support for save/load IA32_UMWAIT_CONTROL MSR Paolo Bonzini
2019-10-24 14:03 ` [PULL 27/39] hw/i386/pc: Extract pc_gsi_create() Paolo Bonzini
2019-10-24 14:03 ` [PULL 28/39] hw/i386/pc: Move gsi_state creation code Paolo Bonzini
2019-10-24 14:03 ` [PULL 29/39] hw/i386/pc: Extract pc_i8259_create() Paolo Bonzini
2019-10-24 14:03 ` [PULL 30/39] hw/i386/pc: Remove kvm_i386.h include Paolo Bonzini
2019-10-24 14:03 ` [PULL 31/39] mc146818rtc: move structure to header file Paolo Bonzini
2019-10-24 14:03 ` [PULL 32/39] mc146818rtc: Move RTC_ISA_IRQ definition Paolo Bonzini
2019-10-24 14:03 ` [PULL 33/39] mc146818rtc: Include mc146818rtc_regs.h directly in mc146818rtc.c Paolo Bonzini
2019-10-24 14:03 ` Paolo Bonzini [this message]
2019-10-24 14:03 ` [PULL 35/39] audio: fix missing break Paolo Bonzini
2019-10-24 15:14 ` Philippe Mathieu-Daudé
2019-10-24 16:02 ` Paolo Bonzini
2019-10-24 14:03 ` [PULL 36/39] core: replace getpagesize() with qemu_real_host_page_size Paolo Bonzini
2019-10-24 14:03 ` [PULL 37/39] target/i386: move FERR handling to target/i386 Paolo Bonzini
2019-10-24 14:03 ` [PULL 38/39] target/i386: introduce cpu_set_fpus Paolo Bonzini
2019-10-24 14:03 ` [PULL 39/39] i386: implement IGNNE Paolo Bonzini
2019-10-25 8:43 ` [PULL 00/39] Misc (mostly x86) patches for 2019-10-24 no-reply
2019-10-25 10:46 ` Peter Maydell
2019-10-25 11:17 ` Paolo Bonzini
2019-10-26 13:20 ` Philippe Mathieu-Daudé
2019-10-26 13:39 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1571925835-31930-35-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=hpoussin@reactos.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).