From fc1b9ee4aa19e698b07aaa050949b791aa119847 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Tue, 7 Aug 2012 16:05:14 -0700 Subject: rtc: force mc146818 register D to a correct value On Panther Point PCH (and maybe cougar point), when some of the register D reserved bits are set, the RTC starts misbehaving (e.g. incrementing the year byte every second). There are probably undocumented features implemented behind those bits. Let's reset register D to a known state to ensure we get the expected RTC behavior. Change-Id: I7e2c2a2c6130a974bccb3d760b41eaa579a58b67 Signed-off-by: Vincent Palatin Reviewed-on: http://review.coreboot.org/1695 Reviewed-by: Marc Jones Tested-by: build bot (Jenkins) --- src/drivers/pc80/mc146818rtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c index cc14a412dc..efeb378d31 100644 --- a/src/drivers/pc80/mc146818rtc.c +++ b/src/drivers/pc80/mc146818rtc.c @@ -171,6 +171,8 @@ void rtc_init(int invalid) cmos_write(RTC_CONTROL_DEFAULT, RTC_CONTROL); /* Setup the frequency it operates at */ cmos_write(RTC_FREQ_SELECT_DEFAULT, RTC_FREQ_SELECT); + /* Ensure all reserved bits are 0 in register D */ + cmos_write(RTC_VRT, RTC_VALID); #if CONFIG_USE_OPTION_TABLE /* See if there is a LB CMOS checksum error */ -- cgit v1.2.3