summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-11-06 18:39:41 -0800
committerRonald G. Minnich <rminnich@gmail.com>2012-11-12 17:12:14 +0100
commitfeadfb77766c748e8487575ea914fcf68603c1d5 (patch)
treee05881d9d751b990a3ff3a9e2b32f14f77cabd34
parentdd76bc0e01f1701602b052eab6197488118df923 (diff)
If cmos is invalid, always set the rtc date and time
If cmos is invalid for any reason, always set the date and time before marking RTC valid. Change-Id: Ib9d154802f75221d58bf28ba9c813f2529904596 Signed-off-by: Marc Jones <marc.jones@se-eng.com> Reviewed-on: http://review.coreboot.org/1790 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r--src/drivers/pc80/mc146818rtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c
index 4a42b9d1b4..d8d1778b5c 100644
--- a/src/drivers/pc80/mc146818rtc.c
+++ b/src/drivers/pc80/mc146818rtc.c
@@ -97,11 +97,11 @@ void rtc_init(int invalid)
for(i = 10; i < 128; i++) {
cmos_write(0, i);
}
-
+#endif
if (cmos_invalid) {
rtc_update_cmos_date(RTC_HAS_NO_ALTCENTURY);
}
-#endif
+
printk(BIOS_WARNING, "RTC:%s%s%s%s\n",
invalid?" Clear requested":"",
cmos_invalid?" Power Problem":"",