diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2015-02-09 08:17:40 +0100 |
---|---|---|
committer | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2015-02-23 09:09:25 +0100 |
commit | a8b03da4a8e301c6659398431ab3e6a6ffa7a1c1 (patch) | |
tree | 7a2bbdd6cc1cb9edee4961c5e2964fcfc1ae5f9c /src/drivers | |
parent | bc1abb12a902bf57debb1c2a51724c6f34633271 (diff) |
drivers/pc80/mc146818rtc: Enable RTC reset on power loss
If function cmos_init() was called with parameter invalid
set, this indicates, that the caller has found a power
loss event in the RTC registers. In this case, we need to
load the default date and time because it can be corrupted.
Change-Id: Ib8d58a14da0182ceb8167e67440a0f1ea2a20eb7
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: http://review.coreboot.org/8373
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/pc80/mc146818rtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c index fe669caa98..4f034a2db6 100644 --- a/src/drivers/pc80/mc146818rtc.c +++ b/src/drivers/pc80/mc146818rtc.c @@ -86,7 +86,7 @@ static void cmos_set_checksum(int range_start, int range_end, int cks_loc) #ifndef __SMM__ void cmos_init(bool invalid) { - bool cmos_invalid = false; + bool cmos_invalid = invalid; bool checksum_invalid = false; bool clear_cmos; size_t i; |