Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35388 )
Change subject: drivers/pc80: Remove some __PRE_RAM__ and __SMM__ ......................................................................
drivers/pc80: Remove some __PRE_RAM__ and __SMM__
Change-Id: Ic90df69c27d524086405238b9683a69771c1b9d5 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/drivers/pc80/rtc/mc146818rtc.c 1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/35388/1
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c index e0869a9..9ea5414 100644 --- a/src/drivers/pc80/rtc/mc146818rtc.c +++ b/src/drivers/pc80/rtc/mc146818rtc.c @@ -100,7 +100,6 @@ #define RTC_CONTROL_DEFAULT (RTC_24H) #define RTC_FREQ_SELECT_DEFAULT (RTC_REF_CLCK_32KHZ | RTC_RATE_1024HZ)
-#ifndef __SMM__ static bool __cmos_init(bool invalid) { bool cmos_invalid; @@ -109,16 +108,14 @@ size_t i; uint8_t x;
-#ifndef __PRE_RAM__ /* * Avoid clearing pending interrupts and resetting the RTC control * register in the resume path because the Linux kernel relies on * this to know if it should restart the RTC timer queue if the wake * was due to the RTC alarm. */ - if (acpi_is_wakeup_s3()) + if (ENV_RAMSTAGE && acpi_is_wakeup_s3()) return false; -#endif /* __PRE_RAM__ */
printk(BIOS_DEBUG, "RTC Init\n");
@@ -200,13 +197,14 @@
void cmos_init(bool invalid) { + if (ENV_SMM) + return; + if (CONFIG(VBOOT_VBNV_CMOS)) cmos_init_vbnv(invalid); else __cmos_init(invalid); } -#endif /* __SMM__ */ -
/* * This routine returns the value of the requested bits.