Patchwork [RFC,v1,11/20] add rtc_set_irq

login
register
mail settings
Submitter Hu Tao
Date May 22, 2013, 5:33 a.m.
Message ID <aff8534cc12e454236fd0e8b5ce024d92cc695fb.1369193012.git.hutao@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/245542/
State New
Headers show

Comments

Hu Tao - May 22, 2013, 5:33 a.m.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
 hw/timer/mc146818rtc.c         | 6 ++++++
 include/hw/timer/mc146818rtc.h | 1 +
 2 files changed, 7 insertions(+)

Patch

diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index 481604d..2fdae55 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -687,6 +687,12 @@  int rtc_get_memory(ISADevice *dev, int addr)
     return s->cmos_data[addr];
 }
 
+void rtc_set_irq(ISADevice *dev, qemu_irq irq)
+{
+    RTCState *s = MC146818_RTC(dev);
+    s->irq = irq;
+}
+
 static void rtc_set_date_from_host(ISADevice *dev)
 {
     RTCState *s = MC146818_RTC(dev);
diff --git a/include/hw/timer/mc146818rtc.h b/include/hw/timer/mc146818rtc.h
index eaf6497..0eea138 100644
--- a/include/hw/timer/mc146818rtc.h
+++ b/include/hw/timer/mc146818rtc.h
@@ -9,5 +9,6 @@ 
 ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq);
 void rtc_set_memory(ISADevice *dev, int addr, int val);
 int rtc_get_memory(ISADevice *dev, int addr);
+void rtc_set_irq(ISADevice *dev, qemu_irq irq);
 
 #endif /* !MC146818RTC_H */