From 5ce0fe117626b10f327fe279f64856cde575946c Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 25 Jul 2017 16:11:36 +0200 Subject: Port cmos.default handling to C environment bootblock Gather related code in the new file drivers/pc80/rtc/mc146818rtc_boot.c, call sanitize_cmos() from C environment bootblock. Change-Id: Ia5c64de208a5986299c0508d0e11eeb8473deef1 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/20768 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/include/pc80/mc146818rtc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/pc80/mc146818rtc.h') diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index f6a1c04372..5d7497df56 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -254,8 +254,15 @@ static inline void cmos_post_log(void) {} static inline void cmos_post_init(void) {} #endif /* CONFIG_CMOS_POST */ +#if IS_ENABLED(CONFIG_USE_OPTION_TABLE) +void sanitize_cmos(void); +#else +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 */ #endif /* PC80_MC146818RTC_H */ -- cgit v1.2.3