agp_via.c (172262) | agp_via.c (173203) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_via.c 172262 2007-09-21 02:10:13Z kevlo $"); | 28__FBSDID("$FreeBSD: head/sys/dev/agp/agp_via.c 173203 2007-10-30 22:09:16Z jhb $"); |
29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> 35#include <sys/kernel.h> 36#include <sys/module.h> --- 198 unchanged lines hidden (view full) --- 235 236 return 0; 237} 238 239static int 240agp_via_detach(device_t dev) 241{ 242 struct agp_via_softc *sc = device_get_softc(dev); | 29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> 35#include <sys/kernel.h> 36#include <sys/module.h> --- 198 unchanged lines hidden (view full) --- 235 236 return 0; 237} 238 239static int 240agp_via_detach(device_t dev) 241{ 242 struct agp_via_softc *sc = device_get_softc(dev); |
243 int error; | |
244 | 243 |
245 error = agp_generic_detach(dev); 246 if (error) 247 return error; | 244 agp_free_cdev(dev); |
248 249 pci_write_config(dev, sc->regs[REG_GARTCTRL], 0, 4); 250 pci_write_config(dev, sc->regs[REG_ATTBASE], 0, 4); 251 AGP_SET_APERTURE(dev, sc->initial_aperture); 252 agp_free_gatt(sc->gatt); | 245 246 pci_write_config(dev, sc->regs[REG_GARTCTRL], 0, 4); 247 pci_write_config(dev, sc->regs[REG_ATTBASE], 0, 4); 248 AGP_SET_APERTURE(dev, sc->initial_aperture); 249 agp_free_gatt(sc->gatt); |
250 agp_free_res(dev); |
|
253 254 return 0; 255} 256 257static u_int32_t 258agp_via_get_aperture(device_t dev) 259{ 260 struct agp_via_softc *sc = device_get_softc(dev); --- 169 unchanged lines hidden --- | 251 252 return 0; 253} 254 255static u_int32_t 256agp_via_get_aperture(device_t dev) 257{ 258 struct agp_via_softc *sc = device_get_softc(dev); --- 169 unchanged lines hidden --- |