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)
This commit is contained in:
Werner Zeh 2015-02-09 08:17:40 +01:00 committed by Alexandru Gagniuc
parent bc1abb12a9
commit a8b03da4a8
1 changed files with 1 additions and 1 deletions

View File

@ -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;