[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/14] MC146818 RTC: add GPIO access to output IR
From: |
Efimov Vasily |
Subject: |
[Qemu-devel] [PATCH v2 13/14] MC146818 RTC: add GPIO access to output IRQ |
Date: |
Wed, 22 Jun 2016 15:24:57 +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.
Signed-off-by: Efimov Vasily <address@hidden>
---
hw/timer/mc146818rtc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index f4e333e..ea625f2 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -906,6 +906,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)
@@ -920,9 +922,9 @@ 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);
+ isa_connect_gpio_out(isadev, 0, RTC_ISA_IRQ);
}
QLIST_INSERT_HEAD(&rtc_devices, s, link);
--
2.7.4
- [Qemu-devel] [PATCH v2 11/14] ICH9 LPC: move call of isa_bus_irqs to 'realize' method, (continued)
- [Qemu-devel] [PATCH v2 11/14] ICH9 LPC: move call of isa_bus_irqs to 'realize' method, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 02/14] pcspk: convert "pit" property type from ptr to link, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 07/14] pckbd: handle A20 IRQ as GPIO, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 04/14] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 14/14] ICH9 LPC: configure PCI IRQs routing internally, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 05/14] Q35: implement property interfece to several parameters, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 08/14] port92: handle A20 IRQ as GPIO, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 10/14] ICH9 LPC: handle GSI as qdev GPIO, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 12/14] isa: introduce wrapper isa_connect_gpio_out, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 06/14] pc_q35: configure Q35 instance using properties, Efimov Vasily, 2016/06/22
- [Qemu-devel] [PATCH v2 13/14] MC146818 RTC: add GPIO access to output IRQ,
Efimov Vasily <=
- [Qemu-devel] [PATCH v2 09/14] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public, Efimov Vasily, 2016/06/22
- Re: [Qemu-devel] [PATCH v2 00/14] Make Q35 devices closer to Qemu object model., Paolo Bonzini, 2016/06/22