Skip to contentSkip to conversation

rtc: remove dead SQW IRQ code

PATCH In review Jan Kiszka 1 participant 2 messages Aug 14, 2013 – Nov 4, 2013

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 rtc: remove dead SQW IRQ code

This was once introduced by commit 100d9891d6 but was never used in-tree and then got broken by commit 32e0c8260d. Time to clean up.

---
 hw/timer/mc146818rtc.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
hw/timer/mc146818rtc.c +1 -8
index 3c3baac..b3f1baa 100644
@@ -70,7 +70,6 @@ typedef struct RTCState {
     uint64_t last_update;
     int64_t offset;
     qemu_irq irq;
-    qemu_irq sqw_irq;
     int it_shift;
     /* periodic timer */
     QEMUTimer *periodic_timer;
@@ -151,8 +150,7 @@ static void periodic_timer_update(RTCState *s, int64_t current_time)
 
     period_code = s->cmos_data[RTC_REG_A] & 0x0f;
     if (period_code != 0
-        && ((s->cmos_data[RTC_REG_B] & REG_B_PIE)
-            || ((s->cmos_data[RTC_REG_B] & REG_B_SQWE) && s->sqw_irq))) {
+        && (s->cmos_data[RTC_REG_B] & REG_B_PIE)) {
         if (period_code <= 2)
             period_code += 7;
         /* period in 32 Khz cycles */
@@ -202,11 +200,6 @@ static void rtc_periodic_timer(void *opaque)
 #endif
         qemu_irq_raise(s->irq);
     }
-    if (s->cmos_data[RTC_REG_B] & REG_B_SQWE) {
-        /* Not square wave at all but we don't want 2048Hz interrupts!
-           Must be seen as a pulse.  */
-        qemu_irq_raise(s->sqw_irq);
-    }
 }
 
 /* handle update-ended timer */
Signature · 1 line
1.7.3.4
author
#1 lore raw
Quoted 33 lines · Jan Kiszka

This was once introduced by commit 100d9891d6 but was never used in-tree and then got broken by commit 32e0c8260d. Time to clean up.

---
 hw/timer/mc146818rtc.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
hw/timer/mc146818rtc.c +1 -3
index 3c3baac..b3f1baa 100644
@@ -70,7 +70,6 @@ typedef struct RTCState {
     uint64_t last_update;
     int64_t offset;
     qemu_irq irq;
-    qemu_irq sqw_irq;
     int it_shift;
     /* periodic timer */
     QEMUTimer *periodic_timer;
@@ -151,8 +150,7 @@ static void periodic_timer_update(RTCState *s, int64_t current_time)
 
     period_code = s->cmos_data[RTC_REG_A] & 0x0f;
     if (period_code != 0
-        && ((s->cmos_data[RTC_REG_B] & REG_B_PIE)
-            || ((s->cmos_data[RTC_REG_B] & REG_B_SQWE) && s->sqw_irq))) {
+        && (s->cmos_data[RTC_REG_B] & REG_B_PIE)) {
         if (period_code <= 2)
             period_code += 7;
         /* period in 32 Khz cycles */
@@ -202,11 +200,6 @@ static void rtc_periodic_timer(void *opaque)
 #endif

hw/timer/mc146818rtc.c static void rtc_periodic_timer(void *opaque) · line 205

Quoted 10 lines
hw/timer/mc146818rtc.c +0 -5
         qemu_irq_raise(s->irq);
     }
-    if (s->cmos_data[RTC_REG_B] & REG_B_SQWE) {
-        /* Not square wave at all but we don't want 2048Hz interrupts!
-           Must be seen as a pulse.  */
-        qemu_irq_raise(s->sqw_irq);
-    }
 }
 
 /* handle update-ended timer */

ping

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux