diff options
| author | Remko Lodder <remko@FreeBSD.org> | 2008-03-12 18:23:39 +0000 |
|---|---|---|
| committer | Remko Lodder <remko@FreeBSD.org> | 2008-03-12 18:23:39 +0000 |
| commit | 4ee0aeea8a824cf8be3ba9a23ad2e387a097b5f8 (patch) | |
| tree | cee7f052851af52bcb3a8fc1b3e5f1066780e5b0 /sys/dev | |
| parent | 772619e18645b4c0efe714d89eeffbab68f7d6fb (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/agp/agp_i810.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 7014feba5f97..cda1dc370e7c 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), |
