diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-05-27 12:40:01 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-05-27 12:40:01 +0000 |
commit | de1e832431a2d50e7dbc3f1f3e3cde3e42547591 (patch) | |
tree | 5e9c3e2d73ba82c461f8640674e30d848c99bd57 /sys | |
parent | b7b1ca954f89620ce5c230f140665dbf9972a99d (diff) |
We're never going to detach agp(4), so remove the #ifdef'ed out code like we
already did for intagp(4).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/agp_ali.c | 31 | ||||
-rw-r--r-- | sys/dev/pci/agp_amd.c | 44 | ||||
-rw-r--r-- | sys/dev/pci/agp_intel.c | 27 | ||||
-rw-r--r-- | sys/dev/pci/agp_sis.c | 27 | ||||
-rw-r--r-- | sys/dev/pci/agp_via.c | 22 |
5 files changed, 5 insertions, 146 deletions
diff --git a/sys/dev/pci/agp_ali.c b/sys/dev/pci/agp_ali.c index 494bb9e5939..225394c8c11 100644 --- a/sys/dev/pci/agp_ali.c +++ b/sys/dev/pci/agp_ali.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_ali.c,v 1.14 2014/03/26 14:41:41 mpi Exp $ */ +/* $OpenBSD: agp_ali.c,v 1.15 2014/05/27 12:40:00 kettenis Exp $ */ /* $NetBSD: agp_ali.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ @@ -146,35 +146,6 @@ agp_ali_attach(struct device *parent, struct device *self, void *aux) return; } -#if 0 -int -agp_ali_detach(struct agp_softc *sc) -{ - int error; - pcireg_t reg; - struct agp_ali_softc *asc = sc->sc_chipc; - - error = agp_generic_detach(sc); - if (error) - return (error); - - /* Disable the TLB.. */ - reg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, AGP_ALI_TLBCTRL); - reg &= ~0xff; - reg |= 0x90; - pci_conf_write(sc->sc_pc, sc->sc_pcitag, AGP_ALI_TLBCTRL, reg); - - /* Put the aperture back the way it started. */ - AGP_SET_APERTURE(sc, asc->initial_aperture); - reg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, AGP_ALI_ATTBASE); - reg &= 0xff; - pci_conf_write(sc->sc_pc, sc->sc_pcitag, AGP_ALI_ATTBASE, reg); - - agp_free_gatt(sc, asc->gatt); - return (0); -} -#endif - int agp_ali_activate(struct device *arg, int act) { diff --git a/sys/dev/pci/agp_amd.c b/sys/dev/pci/agp_amd.c index 5147ccad7c8..f04f984401d 100644 --- a/sys/dev/pci/agp_amd.c +++ b/sys/dev/pci/agp_amd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_amd.c,v 1.18 2014/03/26 14:41:41 mpi Exp $ */ +/* $OpenBSD: agp_amd.c,v 1.19 2014/05/27 12:40:00 kettenis Exp $ */ /* $NetBSD: agp_amd.c,v 1.6 2001/10/06 02:48:50 thorpej Exp $ */ /*- @@ -153,18 +153,6 @@ agp_amd_alloc_gatt(bus_dma_tag_t dmat, bus_size_t apsize) return (gatt); } -#if 0 -void -agp_amd_free_gatt(bus_dma_tag_t dmat, struct agp_amd_gatt *gatt) -{ - bus_dmamem_unmap(dmat, gatt->ag_virtual, gatt->ag_size); - agp_free_dmamem(dmat, gatt->ag_size, - gatt->ag_dmamap, (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, - gatt->ag_nseg); - free(gatt, M_AGP); -} -#endif - int agp_amd_probe(struct device *parent, void *match, void *aux) { @@ -243,36 +231,6 @@ agp_amd_attach(struct device *parent, struct device *self, void *aux) return; } -#if 0 -int -agp_amd_detach(void *sc) -{ - struct agp_amd_softc *asc = sc; - pcireg_t reg; - - /* Disable the TLB.. */ - WRITE2(AGP_AMD751_STATUS, - READ2(AGP_AMD751_STATUS) & ~AGP_AMD751_STATUS_GCE); - - /* Disable host-agp sync */ - reg = pci_conf_read(asc->asc_pc, asc->asc_tag, AGP_AMD751_MODECTRL); - reg &= 0xffffff00; - pci_conf_write(asc->asc_pc, asc->asc_pcitag, AGP_AMD751_MODECTRL, reg); - - /* Clear the GATT base */ - WRITE4(AGP_AMD751_ATTBASE, 0); - - /* Put the aperture back the way it started. */ - agp_amd_set_aperture(asc, asc->initial_aperture); - - agp_amd_free_gatt(asc, asc->gatt); - - /* XXXfvdl no pci_mapreg_unmap */ - - return (0); -} -#endif - int agp_amd_activate(struct device *arg, int act) { diff --git a/sys/dev/pci/agp_intel.c b/sys/dev/pci/agp_intel.c index b10f321f2d1..9578729f764 100644 --- a/sys/dev/pci/agp_intel.c +++ b/sys/dev/pci/agp_intel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_intel.c,v 1.22 2014/03/26 14:41:41 mpi Exp $ */ +/* $OpenBSD: agp_intel.c,v 1.23 2014/05/27 12:40:00 kettenis Exp $ */ /* $NetBSD: agp_intel.c,v 1.3 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -383,31 +383,6 @@ agp_intel_restore(struct agp_intel_softc *isc) } } -#if 0 -int -agp_intel_detach(struct agp_softc *sc) -{ - int error; - pcireg_t reg; - struct agp_intel_softc *isc = sc->sc_chipc; - - error = agp_generic_detach(sc); - if (error) - return (error); - - /* XXX i845/i855PM/i840/i850E */ - reg = pci_conf_read(sc->sc_pc, sc->sc_tag, AGP_INTEL_NBXCFG); - reg &= ~(1 << 9); - printf("%s: set NBXCFG to %x\n", __FUNCTION__, reg); - pci_conf_write(sc->sc_pc, sc->sc_tag, AGP_INTEL_NBXCFG, reg); - pci_conf_write(sc->sc_pc, sc->sc_tag, AGP_INTEL_ATTBASE, 0); - AGP_SET_APERTURE(sc, isc->initial_aperture); - agp_free_gatt(sc, isc->gatt); - - return (0); -} -#endif - bus_size_t agp_intel_get_aperture(void *sc) { diff --git a/sys/dev/pci/agp_sis.c b/sys/dev/pci/agp_sis.c index cbf64ac7124..06ae10e3244 100644 --- a/sys/dev/pci/agp_sis.c +++ b/sys/dev/pci/agp_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_sis.c,v 1.17 2014/03/26 14:41:41 mpi Exp $ */ +/* $OpenBSD: agp_sis.c,v 1.18 2014/05/27 12:40:00 kettenis Exp $ */ /* $NetBSD: agp_sis.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -146,31 +146,6 @@ agp_sis_attach(struct device *parent, struct device *self, void *aux) return; } -#if 0 -int -agp_sis_detach(struct agp_softc *sc) -{ - struct agp_sis_softc *ssc = sc->sc_chipc; - pcireg_t reg; - int error; - - error = agp_generic_detach(sc); - if (error) - return (error); - - reg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, AGP_SIS_WINCTRL); - reg &= ~3; - reg &= 0x00ffffff; - pci_conf_write(sc->sc_pc, sc->sc_pcitag, AGP_SIS_WINCTRL, reg); - - /* Put the aperture back the way it started. */ - AGP_SET_APERTURE(sc, ssc->initial_aperture); - - agp_free_gatt(sc, ssc->gatt); - return (0); -} -#endif - int agp_sis_activate(struct device *arg, int act) { diff --git a/sys/dev/pci/agp_via.c b/sys/dev/pci/agp_via.c index d3aa8af3ee4..f77a3a67a8e 100644 --- a/sys/dev/pci/agp_via.c +++ b/sys/dev/pci/agp_via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_via.c,v 1.19 2014/03/26 14:41:41 mpi Exp $ */ +/* $OpenBSD: agp_via.c,v 1.20 2014/05/27 12:40:00 kettenis Exp $ */ /* $NetBSD: agp_via.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -188,26 +188,6 @@ agp_via_attach(struct device *parent, struct device *self, void *aux) return; } -#if 0 -int -agp_via_detach(struct agp_softc *sc) -{ - struct agp_via_softc *vsc = sc->sc_chipc; - int error; - - error = agp_generic_detach(sc); - if (error) - return (error); - - pci_conf_write(sc->as_pc, sc->as_tag, vsc->regs[REG_GARTCTRL], 0); - pci_conf_write(sc->as_pc, sc->as_tag, vsc->regs[REG_ATTBASE], 0); - AGP_SET_APERTURE(sc, vsc->initial_aperture); - agp_free_gatt(sc, vsc->gatt); - - return (0); -} -#endif - int agp_via_activate(struct device *arg, int act) { |