Anytime we write to the RTC's status B register to possibly enable

interrupts, read from the interrupt status register to clear any pending
interrupts.  Otherwise in some rare cases the RTC would never fire any
interrupts as it constantly thinks it has an interrupt pending.

PR:		i386/17800
PR:		kern/76776
Submitted by:	Jose M. Alcaide jose at we dot lc dot ehu dot es
MFC after:	2 weeks
This commit is contained in:
jhb 2005-02-03 19:06:03 +00:00
parent a1edfec034
commit 5daaea8f22
2 changed files with 6 additions and 0 deletions

View File

@ -712,6 +712,7 @@ rtc_restore(void)
writertc(RTC_STATUSB, RTCSB_24HR);
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
/*
@ -911,6 +912,7 @@ resettodr()
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
@ -957,6 +959,7 @@ cpu_initclocks()
INTR_TYPE_CLK | INTR_FAST, NULL);
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
init_TSC_tc();

View File

@ -712,6 +712,7 @@ rtc_restore(void)
writertc(RTC_STATUSB, RTCSB_24HR);
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
/*
@ -911,6 +912,7 @@ resettodr()
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
@ -957,6 +959,7 @@ cpu_initclocks()
INTR_TYPE_CLK | INTR_FAST, NULL);
writertc(RTC_STATUSB, rtc_statusb);
rtcin(RTC_INTR);
}
init_TSC_tc();