diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-07 18:14:41 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-07 18:14:41 +0000 |
commit | d537cf6c8624b27ce2b63431d2f8937f6356f652 (patch) | |
tree | d7173d79977b4426b2ff225b35c839c8a2e4a215 /hw/mc146818rtc.c | |
parent | b6e27ab8b12ef6075d85fc505f821643804a3a79 (diff) | |
download | qemu-d537cf6c8624b27ce2b63431d2f8937f6356f652.zip qemu-d537cf6c8624b27ce2b63431d2f8937f6356f652.tar.gz qemu-d537cf6c8624b27ce2b63431d2f8937f6356f652.tar.bz2 |
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mc146818rtc.c')
-rw-r--r-- | hw/mc146818rtc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index bad4cbd..8b93574 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -54,7 +54,7 @@ struct RTCState { uint8_t cmos_data[128]; uint8_t cmos_index; struct tm current_tm; - int irq; + qemu_irq irq; /* periodic timer */ QEMUTimer *periodic_timer; int64_t next_periodic_time; @@ -95,7 +95,7 @@ static void rtc_periodic_timer(void *opaque) rtc_timer_update(s, s->next_periodic_time); s->cmos_data[RTC_REG_C] |= 0xc0; - pic_set_irq(s->irq, 1); + qemu_irq_raise(s->irq); } static void cmos_ioport_write(void *opaque, uint32_t addr, uint32_t data) @@ -314,14 +314,14 @@ static void rtc_update_second2(void *opaque) s->cmos_data[RTC_HOURS_ALARM] == s->current_tm.tm_hour)) { s->cmos_data[RTC_REG_C] |= 0xa0; - pic_set_irq(s->irq, 1); + qemu_irq_raise(s->irq); } } /* update ended interrupt */ if (s->cmos_data[RTC_REG_B] & REG_B_UIE) { s->cmos_data[RTC_REG_C] |= 0x90; - pic_set_irq(s->irq, 1); + qemu_irq_raise(s->irq); } /* clear update in progress bit */ @@ -353,7 +353,7 @@ static uint32_t cmos_ioport_read(void *opaque, uint32_t addr) break; case RTC_REG_C: ret = s->cmos_data[s->cmos_index]; - pic_set_irq(s->irq, 0); + qemu_irq_lower(s->irq); s->cmos_data[RTC_REG_C] = 0x00; break; default: @@ -453,7 +453,7 @@ static int rtc_load(QEMUFile *f, void *opaque, int version_id) return 0; } -RTCState *rtc_init(int base, int irq) +RTCState *rtc_init(int base, qemu_irq irq) { RTCState *s; |