mc146818rtc: update registers after a format change
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 25 Jan 2011 10:55:15 +0000 (11:55 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 29 Jan 2011 14:19:22 +0000 (15:19 +0100)
commit260d459cc2dd20d48f1626ffb42ac71f58a800b6
treecfdfc4c13300191c3982e6bb026ba09ea5dba705
parent9a2eea3bf6e12b9590be3a7484cd14a3bd40f8de
mc146818rtc: update registers after a format change

For some unknown reason, the MIPS kernel briefly changes the RTC to
binary mode during boot, switch back to BCD mode and read the time. As
the registers are updated only every second, they may still be in the
old format when they are read.

This patch forces a register update immediately after a format change
(BCD/binary or 12/24H). This avoid long fsck during boot due to time
wrap.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/mc146818rtc.c