diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-03-15 20:46:16 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-03-15 20:46:16 +0000 |
commit | 5948f6a3e9f6d25f3f6cff3c7e4f989003bb5333 (patch) | |
tree | 85ab6274bbd24a99979c5c21b55575aef9071b42 | |
parent | 5d566994237591142b6ec4faf4cc9550660081e2 (diff) |
Remove dead code (SUPPORTS_NON_CONSOLE and MD_DISPLAY_ISA_IOT)
ok miod@, drahn@, dim@.
-rw-r--r-- | sys/arch/macppc/pci/vgafb_pci.c | 36 | ||||
-rw-r--r-- | sys/dev/pci/vga_pci.c | 41 |
2 files changed, 28 insertions, 49 deletions
diff --git a/sys/arch/macppc/pci/vgafb_pci.c b/sys/arch/macppc/pci/vgafb_pci.c index ab7b6781a3c..9efc3ba93cf 100644 --- a/sys/arch/macppc/pci/vgafb_pci.c +++ b/sys/arch/macppc/pci/vgafb_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb_pci.c,v 1.16 2006/01/02 05:21:32 brad Exp $ */ +/* $OpenBSD: vgafb_pci.c,v 1.17 2006/03/15 20:46:15 matthieu Exp $ */ /* $NetBSD: vga_pci.c,v 1.4 1996/12/05 01:39:38 cgd Exp $ */ /* @@ -230,12 +230,6 @@ vgafb_pci_match(parent, match, aux) void *aux; { struct pci_attach_args *pa = aux; -#ifdef SUPPORTS_NON_CONSOLE - u_int32_t memaddr, memsize, cacheable; - u_int32_t ioaddr, iosize; - u_int32_t mmioaddr, mmiosize; - int retval; -#endif int potential; static int id = 0; int myid; @@ -278,34 +272,6 @@ vgafb_pci_match(parent, match, aux) } #endif -#ifdef SUPPORTS_NON_CONSOLE - /* ALL non-console vga support removed for now. - * when the problems with it are resolved, - * it can be reenabled. - */ - - memaddr=0xb8000; /* default to isa addresses? */ - ioaddr = 0; /* default to isa addresses? */ - - retval = vgafb_pci_probe(pa, myid, &ioaddr, &iosize, - &memaddr, &memsize, &cacheable, &mmioaddr, &mmiosize); - if (retval == 0) { - return 0; - } -#if 1 - printf("ioaddr %x, iosize %x, memaddr %x, memsize %x mmioaddr %x mmiosize %x\n", - ioaddr, iosize, memaddr, memsize, mmioaddr, mmiosize); -#endif - - if (!vgafb_common_probe(pa->pa_iot, pa->pa_memt, ioaddr, iosize, memaddr, memsize, mmioaddr, mmiosize)) - { - printf("vgafb_pci_match: common_probe failed\n"); - return (0); - } - id++; - - return (1); -#endif return (0); } diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 0df6667c1da..a1d6b624109 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.20 2005/11/19 02:18:00 pedro Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.21 2006/03/15 20:46:15 matthieu Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /*- @@ -176,13 +176,8 @@ vga_pci_match(parent, match, aux) /* * If we might match, make sure that the card actually looks OK. */ -#ifdef MD_DISPLAY_ISA_IOT - if (!vga_common_probe(MD_DISPLAY_ISA_IOT, MD_DISPLAY_ISA_MEMT)) - return (0); -#else if (!vga_common_probe(pa->pa_iot, pa->pa_memt)) return (0); -#endif return (1); } @@ -192,9 +187,7 @@ vga_pci_attach(parent, self, aux) struct device *parent, *self; void *aux; { -#ifndef MD_DISPLAY_ISA_IOT struct pci_attach_args *pa = aux; -#endif #ifdef PCIAGP struct vga_pci_softc *sc = (struct vga_pci_softc *)self; const struct agp_product *ap; @@ -259,13 +252,8 @@ vga_pci_attach(parent, self, aux) } #endif printf("\n"); -#ifdef MD_DISPLAY_ISA_IOT - vga_extended_attach(self, MD_DISPLAY_ISA_IOT, ppc_isa_membus_space, - WSDISPLAY_TYPE_PCIVGA, vga_pci_mmap); -#else vga_common_attach(self, pa->pa_iot, pa->pa_memt, WSDISPLAY_TYPE_PCIVGA); -#endif } paddr_t @@ -436,6 +424,31 @@ vga_pci_ioctl(v, cmd, addr, flag, p) } #ifdef PCIAGP +void +vga_pci_close(void *v) +{ + struct vga_config *vc = v; + struct vga_pci_softc *sc = (struct vga_pci_softc *)vc->vc_softc; + struct agp_memory *mem; + + /* + * Clear out the aperture and free any + * outstanding memory blocks. + */ + TAILQ_FOREACH(mem, &sc->sc_memory, am_link) { + if (mem->am_is_bound) { + AGP_UNBIND_MEMORY(sc, mem); + } + } + + while (!TAILQ_EMPTY(&sc->sc_memory)) { + mem = TAILQ_FIRST(&sc->sc_memory); + AGP_FREE_MEMORY(sc, mem); + } + + sc->sc_state = AGP_ACQUIRE_FREE; +} + struct agp_memory * agp_find_memory(struct vga_pci_softc *sc, int id) { @@ -889,4 +902,4 @@ agp_free_dmamem(bus_dma_tag_t tag, size_t size, bus_dmamap_t map, bus_dmamem_unmap(tag, vaddr, size); bus_dmamem_free(tag, seg, nseg); } -#endif +#endif /* PCIAGP */ |