Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38182 )
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
drivers/pc80/rtc: Remove stub for sanitize_cmos()
We only have a single call-site for this.
Change-Id: I7ab19c6ea4ef01334f4d229c5636b64f99c86119 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/drivers/pc80/rtc/mc146818rtc_boot.c M src/include/option.h M src/include/pc80/mc146818rtc.h M src/lib/bootblock.c 4 files changed, 21 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/38182/1
diff --git a/src/drivers/pc80/rtc/mc146818rtc_boot.c b/src/drivers/pc80/rtc/mc146818rtc_boot.c index c2ab707..fd0095e 100644 --- a/src/drivers/pc80/rtc/mc146818rtc_boot.c +++ b/src/drivers/pc80/rtc/mc146818rtc_boot.c @@ -13,6 +13,7 @@
#include <stdint.h> #include <cbfs.h> +#include <option.h> #include <pc80/mc146818rtc.h> #include <fallback.h> #if CONFIG(USE_OPTION_TABLE) @@ -40,7 +41,6 @@ #endif }
-#if CONFIG(USE_OPTION_TABLE) void sanitize_cmos(void) { if (cmos_error() || !cmos_chksum_valid() || @@ -58,7 +58,6 @@ } } } -#endif
#if CONFIG_MAX_REBOOT_CNT > 15 #error "CONFIG_MAX_REBOOT_CNT too high" diff --git a/src/include/option.h b/src/include/option.h index 3a20dcf..7afedac 100644 --- a/src/include/option.h +++ b/src/include/option.h @@ -1,6 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #ifndef _OPTION_H_ #define _OPTION_H_
+#include <types.h> + +void sanitize_cmos(void); + /* * FIXME: get_option() needs to be abstracted better so that other non-volatile * storage can be used. This will benefit machines without CMOS as well as those @@ -9,7 +26,6 @@ #if CONFIG(USE_OPTION_TABLE) #include <pc80/mc146818rtc.h> #else -#include <types.h> static inline enum cb_err get_option(void *dest, const char *name) { return CB_CMOS_OTABLE_DISABLED; diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index 6d12940..e3bd63a 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -215,14 +215,6 @@ static inline void cmos_post_log(void) {} #endif /* CONFIG_CMOS_POST */
-#if 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 sanitize_cmos(void) {} #endif /* CONFIG_ARCH_X86 */
void cmos_post_init(void); diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c index 6d40bc0..386f4e3 100644 --- a/src/lib/bootblock.c +++ b/src/lib/bootblock.c @@ -18,6 +18,7 @@ #include <bootblock_common.h> #include <console/console.h> #include <delay.h> +#include <option.h> #include <pc80/mc146818rtc.h> #include <program_loading.h> #include <symbols.h> @@ -56,7 +57,8 @@ bootblock_soc_early_init(); bootblock_mainboard_early_init();
- sanitize_cmos(); + if (CONFIG(USE_OPTION_TABLE)) + sanitize_cmos();
if (CONFIG(CMOS_POST)) cmos_post_init();
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38182
to look at the new patch set (#2).
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
drivers/pc80/rtc: Remove stub for sanitize_cmos()
We only have a single call-site for this.
Change-Id: I7ab19c6ea4ef01334f4d229c5636b64f99c86119 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/drivers/pc80/rtc/mc146818rtc_boot.c M src/include/option.h M src/include/pc80/mc146818rtc.h M src/lib/bootblock.c 4 files changed, 6 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/38182/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38182
to look at the new patch set (#5).
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
drivers/pc80/rtc: Remove stub for sanitize_cmos()
We only have a single call-site for this.
Change-Id: I7ab19c6ea4ef01334f4d229c5636b64f99c86119 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/drivers/pc80/rtc/mc146818rtc_boot.c M src/include/option.h M src/include/pc80/mc146818rtc.h M src/lib/bootblock.c 4 files changed, 6 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/38182/5
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38182
to look at the new patch set (#6).
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
drivers/pc80/rtc: Remove stub for sanitize_cmos()
We only have a single call-site for this.
Change-Id: I7ab19c6ea4ef01334f4d229c5636b64f99c86119 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/include/pc80/mc146818rtc.h M src/lib/bootblock.c 2 files changed, 3 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/38182/6
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38182 )
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
Patch Set 6: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38182 )
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
Patch Set 7: Code-Review+2
Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38182 )
Change subject: drivers/pc80/rtc: Remove stub for sanitize_cmos() ......................................................................
drivers/pc80/rtc: Remove stub for sanitize_cmos()
We only have a single call-site for this.
Change-Id: I7ab19c6ea4ef01334f4d229c5636b64f99c86119 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/38182 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Patrick Rudolph siro@das-labor.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/include/pc80/mc146818rtc.h M src/lib/bootblock.c 2 files changed, 3 insertions(+), 9 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index 00606d4..5fd0729 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -215,16 +215,9 @@ static inline void cmos_post_log(void) {} #endif /* CONFIG_CMOS_POST */
-#if 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 sanitize_cmos(void) {} #endif /* CONFIG_ARCH_X86 */
+void sanitize_cmos(void); void cmos_post_init(void);
#endif /* PC80_MC146818RTC_H */ diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c index 6d40bc0..beb6701 100644 --- a/src/lib/bootblock.c +++ b/src/lib/bootblock.c @@ -56,7 +56,8 @@ bootblock_soc_early_init(); bootblock_mainboard_early_init();
- sanitize_cmos(); + if (CONFIG(USE_OPTION_TABLE)) + sanitize_cmos();
if (CONFIG(CMOS_POST)) cmos_post_init();