aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@intel.com>2012-08-02 18:04:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-09-10 13:52:28 -0500
commitbedc572eae6e250070495116f0db72607826aee5 (patch)
tree02e7cf8b175da1eaeb6d1bad081a5a6750dd5907
parent6a38e0dc369e6bdc3b3ac4a965a34990c4980b66 (diff)
RTC: Remove the logic to update time format when DM bit changed
Changing the DM (binary/BCD) and 24/12 control bit doesn't affect the internal registers. It only indicates what format is used for those registers. Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/mc146818rtc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 3777f858a..6e5b2f089 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -220,15 +220,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: