diff options
Diffstat (limited to 'src/pc80')
-rw-r--r-- | src/pc80/Makefile.inc | 2 | ||||
-rw-r--r-- | src/pc80/mc146818rtc.c | 5 | ||||
-rw-r--r-- | src/pc80/mc146818rtc_early.c | 7 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/pc80/Makefile.inc b/src/pc80/Makefile.inc index c7c0cd5d0a..43190fd071 100644 --- a/src/pc80/Makefile.inc +++ b/src/pc80/Makefile.inc @@ -6,3 +6,5 @@ obj-y += keyboard.o #initobj-y += serial.o subdirs-y += vga + +$(obj)/pc80/mc146818rtc.o : $(OPTION_TABLE_H) diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c index 1b39db21d1..4bee1cdffe 100644 --- a/src/pc80/mc146818rtc.c +++ b/src/pc80/mc146818rtc.c @@ -3,6 +3,9 @@ #include <pc80/mc146818rtc.h> #include <boot/coreboot_tables.h> #include <string.h> +#if CONFIG_HAVE_OPTION_TABLE +#include <option_table.h> +#endif /* control registers - Moto names */ @@ -257,7 +260,7 @@ int get_option(void *dest, const char *name) } } if(!found) { - printk(BIOS_DEBUG, "WARNING: No cmos option '%s'\n", name); + printk(BIOS_DEBUG, "WARNING: No CMOS option '%s'.\n", name); return(-2); } diff --git a/src/pc80/mc146818rtc_early.c b/src/pc80/mc146818rtc_early.c index 7a1492102a..87fc3f0a61 100644 --- a/src/pc80/mc146818rtc_early.c +++ b/src/pc80/mc146818rtc_early.c @@ -1,5 +1,8 @@ #include <pc80/mc146818rtc.h> #include <fallback.h> +#if CONFIG_HAVE_OPTION_TABLE +#include <option_table.h> +#endif #ifndef CONFIG_MAX_REBOOT_CNT #error "CONFIG_MAX_REBOOT_CNT not defined" @@ -40,6 +43,7 @@ static int cmos_error(void) static int cmos_chksum_valid(void) { +#if CONFIG_HAVE_OPTION_TABLE == 1 unsigned char addr; unsigned long sum, old_sum; sum = 0; @@ -54,6 +58,9 @@ static int cmos_chksum_valid(void) old_sum |= cmos_read(LB_CKS_LOC+1); return sum == old_sum; +#else + return 0; +#endif } |