[coreboot] New patch to review for coreboot: 30cb6c7 rework RTC driver output to make it more consistent.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sat Oct 15 00:27:08 CEST 2011

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/278


commit 30cb6c723bce9cac3c8e5af1b1458352d7e68002
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Fri Oct 14 15:22:52 2011 -0700

    rework RTC driver output to make it more consistent.
    Also add a meaningful define (Not hooked up in Kconfig, that might
    or might not follow)
    Change-Id: I9cc4bca0d23d75e6a1d767932ec62e8c68b39d71
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
 src/pc80/mc146818rtc.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c
index 4bbfa9e..f3bee9b 100644
--- a/src/pc80/mc146818rtc.c
+++ b/src/pc80/mc146818rtc.c
@@ -132,12 +132,14 @@ void rtc_init(int invalid)
 	checksum_invalid = !rtc_checksum_valid(PC_CKS_RANGE_START,
+#define CLEAR_CMOS 0
 	if (invalid || cmos_invalid || checksum_invalid) {
-		printk(BIOS_WARNING, "RTC:%s%s%s zeroing cmos\n",
+		printk(BIOS_WARNING, "RTC:%s%s%s%s\n",
 			invalid?" Clear requested":"",
 			cmos_invalid?" Power Problem":"",
-			checksum_invalid?" Checksum invalid":"");
-#if 0
+			checksum_invalid?" Checksum invalid":"",
+			CLEAR_CMOS?" zeroing cmos":"");
 		cmos_write(0, 0x01);
 		cmos_write(0, 0x03);
 		cmos_write(0, 0x05);
@@ -169,7 +171,7 @@ void rtc_init(int invalid)
 	checksum_invalid = !rtc_checksum_valid(LB_CKS_RANGE_START,
-		printk(BIOS_DEBUG, "Invalid CMOS LB checksum\n");
+		printk(BIOS_DEBUG, "RTC: coreboot checksum invalid\n");
 	/* Make certain we have a valid checksum */
@@ -229,7 +231,8 @@ int get_option(void *dest, const char *name)
 	/* find the requested entry record */
 	ct=cbfs_find_file("cmos_layout.bin", CBFS_COMPONENT_CMOS_LAYOUT);
 	if (!ct) {
-		printk(BIOS_ERR, "cmos_layout.bin could not be found. Options are disabled\n");
+		printk(BIOS_ERR, "RTC: cmos_layout.bin could not be found. "
+						"Options are disabled\n");
 	ce=(struct cmos_entries*)((unsigned char *)ct + ct->header_length);

More information about the coreboot mailing list