summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp
diff options
context:
space:
mode:
authorremko <remko@FreeBSD.org>2008-03-12 18:23:39 +0000
committerremko <remko@FreeBSD.org>2008-03-12 18:23:39 +0000
commit79d33058a7333761d3598b63725418b356edb96e (patch)
treecee7f052851af52bcb3a8fc1b3e5f1066780e5b0 /sys/dev/agp
parente4d08976c45f17fec80f3dbe6359acc5221f6b22 (diff)
downloadFreeBSD-src-79d33058a7333761d3598b63725418b356edb96e.zip
FreeBSD-src-79d33058a7333761d3598b63725418b356edb96e.tar.gz
Add resume support to the agp_i810 family.
Submitted by: "Robert Noland" <rnoland at 2hip dot net> Reviewed by: anholt Approved by: anholt, imp (mentor) MFC after: 1 week
Diffstat (limited to 'sys/dev/agp')
-rw-r--r--sys/dev/agp/agp_i810.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index 7014feb..cda1dc3 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -612,6 +612,21 @@ agp_i810_detach(device_t dev)
return 0;
}
+static int
+agp_i810_resume(device_t dev)
+{
+ struct agp_i810_softc *sc;
+ sc = device_get_softc(dev);
+
+ AGP_SET_APERTURE(dev, sc->initial_aperture);
+
+ /* Install the GATT. */
+ bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL,
+ sc->gatt->ag_physical | 1);
+
+ return (bus_generic_resume(dev));
+}
+
/**
* Sets the PCI resource size of the aperture on i830-class and below chipsets,
* while returning failure on later chipsets when an actual change is
@@ -976,6 +991,8 @@ static device_method_t agp_i810_methods[] = {
DEVMETHOD(device_probe, agp_i810_probe),
DEVMETHOD(device_attach, agp_i810_attach),
DEVMETHOD(device_detach, agp_i810_detach),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, agp_i810_resume),
/* AGP interface */
DEVMETHOD(agp_get_aperture, agp_generic_get_aperture),
OpenPOWER on IntegriCloud