[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/13] MC146818 RTC: add GPIO access to output IRQ
From: |
Efimov Vasily |
Subject: |
[Qemu-devel] [PATCH 12/13] MC146818 RTC: add GPIO access to output IRQ |
Date: |
Fri, 17 Jun 2016 16:11:08 +0300 |
The MC146818 RTC device has output IRQ line.
Currently the corresponding field is only accessible through direct access.
Such access violates Qemu model.
The patch makes the field accessible through GPIO. It also updates the setting
of the IRQ during initialization in case of IRQ intercepting.
Signed-off-by: Efimov Vasily <address@hidden>
---
hw/timer/mc146818rtc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index a11b8b4..d88fe25 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -908,6 +908,8 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
object_property_add_alias(qdev_get_machine(), "rtc-time",
OBJECT(s), "date", NULL);
+
+ qdev_init_gpio_out(dev, &s->irq, 1);
}
ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq)
@@ -922,7 +924,7 @@ ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq
intercept_irq)
qdev_prop_set_int32(dev, "base_year", base_year);
qdev_init_nofail(dev);
if (intercept_irq) {
- s->irq = intercept_irq;
+ qdev_connect_gpio_out(dev, 0, intercept_irq);
} else {
isa_init_irq(isadev, &s->irq, RTC_ISA_IRQ);
}
--
2.7.4
- [Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties, (continued)
- [Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 13/13] ICH9 LPC: configure PCI IRQs routing internally, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 08/13] port92: handle A20 IRQ as GPIO, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 07/13] pckbd: handle A20 IRQ as GPIO, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 12/13] MC146818 RTC: add GPIO access to output IRQ,
Efimov Vasily <=