summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/pc80/mc146818rtc.h5
-rw-r--r--src/lib/bootblock.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h
index 306322654e..00606d4017 100644
--- a/src/include/pc80/mc146818rtc.h
+++ b/src/include/pc80/mc146818rtc.h
@@ -211,10 +211,8 @@ enum cb_err get_option(void *dest, const char *name);
#define CMOS_POST_EXTRA_DEV_PATH 0x01
void cmos_post_log(void);
-void cmos_post_init(void);
#else
static inline void cmos_post_log(void) {}
-static inline void cmos_post_init(void) {}
#endif /* CONFIG_CMOS_POST */
#if CONFIG(USE_OPTION_TABLE)
@@ -224,8 +222,9 @@ static inline void sanitize_cmos(void) {}
#endif /* CONFIG_USE_OPTION_TABLE */
#else /* !CONFIG_ARCH_X86 */
-static inline void cmos_post_init(void) {}
static inline void sanitize_cmos(void) {}
#endif /* CONFIG_ARCH_X86 */
+void cmos_post_init(void);
+
#endif /* PC80_MC146818RTC_H */
diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c
index 5fb606731a..6d40bc0075 100644
--- a/src/lib/bootblock.c
+++ b/src/lib/bootblock.c
@@ -57,7 +57,9 @@ static void bootblock_main_with_timestamp(uint64_t base_timestamp,
bootblock_mainboard_early_init();
sanitize_cmos();
- cmos_post_init();
+
+ if (CONFIG(CMOS_POST))
+ cmos_post_init();
if (CONFIG(BOOTBLOCK_CONSOLE)) {
console_init();