]> git.proxmox.com Git - qemu.git/commitdiff
RTC: Remove the logic to update time format when DM bit changed
authorYang Zhang <yang.z.zhang@intel.com>
Thu, 2 Aug 2012 16:04:04 +0000 (18:04 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 10 Sep 2012 18:52:28 +0000 (13:52 -0500)
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>
hw/mc146818rtc.c

index 3777f858a1dacb387fdcbcd083fb78ab7192085c..6e5b2f089338c7fce8c63ae82b147855f73922a5 100644 (file)
@@ -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: