summaryrefslogtreecommitdiff
path: root/src/drivers/pc80/mc146818rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/pc80/mc146818rtc.c')
-rw-r--r--src/drivers/pc80/mc146818rtc.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c
index be524541fd..79aba27fbd 100644
--- a/src/drivers/pc80/mc146818rtc.c
+++ b/src/drivers/pc80/mc146818rtc.c
@@ -71,6 +71,17 @@ void rtc_init(int invalid)
unsigned char x;
#endif
+#if CONFIG_HAVE_ACPI_RESUME
+ /*
+ * 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_slp_type == 3)
+ return;
+#endif
+
printk(BIOS_DEBUG, "RTC Init\n");
#if CONFIG_USE_OPTION_TABLE
@@ -128,16 +139,6 @@ void rtc_init(int invalid)
PC_CKS_RANGE_END,PC_CKS_LOC);
#endif
-#if CONFIG_HAVE_ACPI_RESUME
- /*
- * Avoid clearing pending interrupts 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_slp_type == 3)
- return;
-#endif
-
/* Clear any pending interrupts */
(void) cmos_read(RTC_INTR_FLAGS);
}