[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 1/7] RTC: Remove the logic to update time format
From: |
Zhang, Yang Z |
Subject: |
[Qemu-devel] [PATCH v5 1/7] RTC: Remove the logic to update time format when DM bit changed |
Date: |
Wed, 9 May 2012 07:22:25 +0000 |
Change DM(date mode) and 24/12 control bit don't affect the internal registers.
It only indicates what format is using for those registers. So we don't need to
update time format when it is modified.
Signed-off-by: Yang Zhang <address@hidden>
---
hw/mc146818rtc.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 8b5cf8c..8f0f0e0 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -255,15 +255,7 @@ static void cmos_ioport_write(void *opaque, uint32_t addr,
uint32_t data)
rtc_set_time(s);
}
}
- if (((s->cmos_data[RTC_REG_B] ^ data) & (REG_B_DM | REG_B_24H)) &&
- !(data & REG_B_SET)) {
- /* If the time format has changed and not in set mode,
- update the registers immediately. */
- s->cmos_data[RTC_REG_B] = data;
- rtc_copy_date(s);
- } else {
- s->cmos_data[RTC_REG_B] = data;
- }
+ s->cmos_data[RTC_REG_B] = data;
rtc_timer_update(s, qemu_get_clock_ns(rtc_clock));
break;
case RTC_REG_C:
--
1.7.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH v5 1/7] RTC: Remove the logic to update time format when DM bit changed,
Zhang, Yang Z <=