summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc_boot.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/drivers/pc80/rtc/mc146818rtc_boot.c b/src/drivers/pc80/rtc/mc146818rtc_boot.c
index a52e2220f1..2998c73baa 100644
--- a/src/drivers/pc80/rtc/mc146818rtc_boot.c
+++ b/src/drivers/pc80/rtc/mc146818rtc_boot.c
@@ -15,13 +15,12 @@
#include <cbfs.h>
#include <pc80/mc146818rtc.h>
#include <fallback.h>
+
#if CONFIG(USE_OPTION_TABLE)
#include <option_table.h>
-#endif
int cmos_chksum_valid(void)
{
-#if CONFIG(USE_OPTION_TABLE)
unsigned char addr;
u16 sum, old_sum;
@@ -35,12 +34,8 @@ int cmos_chksum_valid(void)
old_sum |= cmos_read(LB_CKS_LOC + 1);
return sum == old_sum;
-#else
- return 0;
-#endif
}
-#if CONFIG(USE_OPTION_TABLE)
void sanitize_cmos(void)
{
if (cmos_error() || !cmos_chksum_valid() ||
@@ -88,7 +83,7 @@ int do_normal_boot(void)
{
unsigned char byte;
- if (cmos_error() || !cmos_chksum_valid()) {
+ if (!CONFIG(USE_OPTION_TABLE) || cmos_error() || !cmos_chksum_valid()) {
/* Invalid CMOS checksum detected!
* Force fallback boot...
*/