Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153154005
D15305.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
925 B
Referenced Files
None
Subscribers
None
D15305.id.diff
View Options
Index: sys/dev/acpica/acpi_hpet.c
===================================================================
--- sys/dev/acpica/acpi_hpet.c
+++ sys/dev/acpica/acpi_hpet.c
@@ -841,15 +841,28 @@
static int
hpet_suspend(device_t dev)
{
-// struct hpet_softc *sc;
+ struct hpet_softc *sc;
+ struct hpet_timer *t;
+ int i;
/*
* Disable the timer during suspend. The timer will not lose
* its state in S1 or S2, but we are required to disable
* it.
*/
-// sc = device_get_softc(dev);
-// hpet_disable(sc);
+ sc = device_get_softc(dev);
+ hpet_disable(sc);
+ for (i = 0; i < sc->num_timers; i++) {
+ t = &sc->t[i];
+
+ /*
+ * Clear timer state to minimize chances of confusing
+ * the firmware after resuming from S3.
+ */
+ bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num),
+ t->caps & ~(HPET_TCNF_INT_ENB | HPET_TCNF_TYPE));
+ bus_write_4(sc->mem_res, HPET_ISR, 1 << t->num);
+ }
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:22 PM (2 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31716833
Default Alt Text
D15305.id.diff (925 B)
Attached To
Mode
D15305: hpet_suspend: reset configuration of all timers
Attached
Detach File
Event Timeline
Log In to Comment