From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH] rtc: initialize irq even if caller doesn't use rtc_init() function
Date: Mon, 23 Jan 2012 10:18:49 +0100 [thread overview]
Message-ID: <1327310329-15294-1-git-send-email-hpoussin@reactos.org> (raw)
rtc instanciated with -device has now a working irq line
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/mc146818rtc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 657fa10..3067022 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -672,6 +672,7 @@ static int rtc_initfn(ISADevice *dev)
memory_region_init_io(&s->io, &cmos_ops, s, "rtc", 2);
isa_register_ioport(dev, &s->io, base);
+ isa_init_irq(dev, &s->irq, RTC_ISA_IRQ);
qdev_set_legacy_instance_id(&dev->qdev, base, 2);
qemu_register_reset(rtc_reset, s);
@@ -692,9 +693,8 @@ ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
qdev_prop_set_int32(&dev->qdev, "base_year", base_year);
qdev_init_nofail(&dev->qdev);
if (intercept_irq) {
+ /* Use provided IRQ instead of default one */
s->irq = intercept_irq;
- } else {
- isa_init_irq(dev, &s->irq, RTC_ISA_IRQ);
}
return dev;
}
--
1.7.7.3
next reply other threads:[~2012-01-23 9:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 9:18 Hervé Poussineau [this message]
2012-01-23 11:20 ` [Qemu-devel] [PATCH] rtc: initialize irq even if caller doesn't use rtc_init() function Jan Kiszka
2012-01-23 12:00 ` Hervé Poussineau
2012-01-23 12:06 ` Jan Kiszka
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=1327310329-15294-1-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=aliguori@us.ibm.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).