diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-10-14 15:22:52 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2011-10-17 17:51:40 +0200 |
commit | 1babddb202478c88813ee94911ee5576773e8d96 (patch) | |
tree | 9b2028e6c5a4b64df9621eda96632360e69da958 /src | |
parent | fbadc499a6268f5d69d4aa1844153d6ae1e82cf0 (diff) | |
download | coreboot-1babddb202478c88813ee94911ee5576773e8d96.tar.xz |
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@google.com>
Reviewed-on: http://review.coreboot.org/278
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | 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 4bbfa9ea04..f3bee9bdce 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, PC_CKS_RANGE_END,PC_CKS_LOC); +#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":""); +#if CLEAR_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, LB_CKS_RANGE_END,LB_CKS_LOC); if(checksum_invalid) - printk(BIOS_DEBUG, "Invalid CMOS LB checksum\n"); + printk(BIOS_DEBUG, "RTC: coreboot checksum invalid\n"); /* Make certain we have a valid checksum */ rtc_set_checksum(PC_CKS_RANGE_START, @@ -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"); return(-2); } ce=(struct cmos_entries*)((unsigned char *)ct + ct->header_length); |