Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29329 )
Change subject: drivers/pc80/rtc/mc146818rtc.c: Reset RTC time on RTC power failure ......................................................................
drivers/pc80/rtc/mc146818rtc.c: Reset RTC time on RTC power failure
RTC time contains invalid values on system without RTC battery. Handle 'invalid' the same way as 'cmos_invalid'. This will reset CMOS date when calling function enables 'invalid'.
BUG=N/A TEST=Portwell PQ-M107 booting Linux Embedded
Change-Id: I5eae57d00f328400a8b03c28b7ecdbbc71522206 Signed-off-by: Frans Hendriks fhendriks@eltan.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/29329 Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/pc80/rtc/mc146818rtc.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c index c18f1e94..99079b9 100644 --- a/src/drivers/pc80/rtc/mc146818rtc.c +++ b/src/drivers/pc80/rtc/mc146818rtc.c @@ -3,6 +3,7 @@ * * Copyright 2014 The Chromium OS Authors. All rights reserved. * Copyright (C) 2015 Timothy Pearson tpearson@raptorengineeringinc.com, Raptor Engineering + * Copyright (C) 2018-2019 Eltan B.V. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -144,7 +145,7 @@ cmos_write(0, i); }
- if (cmos_invalid) + if (cmos_invalid || invalid) cmos_reset_date();
printk(BIOS_WARNING, "RTC:%s%s%s%s\n",