diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-01-21 15:06:30 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-01-21 15:06:30 +0000 |
commit | 5cbdf28f10e599cfcb5b9dde0fe5b847e17ebceb (patch) | |
tree | 5888c5c6480da36109b4021c664d2f0f2d515e1e /sys/arch/macppc/pci | |
parent | 097f109e384237c8f7081af082990a35a0d92579 (diff) |
Only the mpcpcibus driver is actually using these structures so merge them
in the appropriate .c file and remove unused fields while here.
Diffstat (limited to 'sys/arch/macppc/pci')
-rw-r--r-- | sys/arch/macppc/pci/ht.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/pci/mpcpcibus.c | 38 | ||||
-rw-r--r-- | sys/arch/macppc/pci/pcibrvar.h | 56 |
3 files changed, 27 insertions, 71 deletions
diff --git a/sys/arch/macppc/pci/ht.c b/sys/arch/macppc/pci/ht.c index 5e258fee95d..1de294a49cb 100644 --- a/sys/arch/macppc/pci/ht.c +++ b/sys/arch/macppc/pci/ht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ht.c,v 1.14 2010/12/04 17:06:31 miod Exp $ */ +/* $OpenBSD: ht.c,v 1.15 2013/01/21 15:06:29 mpi Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -27,8 +27,6 @@ #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> -#include <macppc/pci/pcibrvar.h> - #include <dev/ofw/openfirm.h> int ht_match(struct device *, void *, void *); diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c index 8ad981c5d94..ab4ff0bf772 100644 --- a/sys/arch/macppc/pci/mpcpcibus.c +++ b/sys/arch/macppc/pci/mpcpcibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibus.c,v 1.44 2013/01/21 14:24:17 mpi Exp $ */ +/* $OpenBSD: mpcpcibus.c,v 1.45 2013/01/21 15:06:29 mpi Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -33,23 +33,17 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/malloc.h> #include <sys/device.h> -#include <sys/proc.h> -#include <uvm/uvm_extern.h> +#include <sys/malloc.h> +#include <sys/extent.h> #include <machine/autoconf.h> #include <machine/pcb.h> -#include <machine/bat.h> -#include <machine/powerpc.h> #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> -#include <macppc/pci/pcibrvar.h> - #include <dev/ofw/openfirm.h> int mpcpcibrmatch(struct device *, void *, void *); @@ -77,6 +71,28 @@ int find_node_intr (int parent, u_int32_t *addr, u_int32_t *intr); void fix_node_irq(int node, struct pcibus_attach_args *pba); +struct pcibr_config { + bus_space_tag_t lc_memt; + bus_space_tag_t lc_iot; + bus_space_handle_t ioh_cf8; + bus_space_handle_t ioh_cfc; + struct ppc_pci_chipset lc_pc; + int config_type; + int bus; + int node; +}; + +struct pcibr_softc { + struct device sc_dev; + struct ppc_bus_space sc_membus_space; + struct ppc_bus_space sc_iobus_space; + struct pcibr_config pcibr_config; + struct extent *sc_ioex; + struct extent *sc_memex; + char sc_ioex_name[32]; + char sc_memex_name[32]; +}; + struct cfattach mpcpcibr_ca = { sizeof(struct pcibr_softc), mpcpcibrmatch, mpcpcibrattach, }; @@ -90,8 +106,6 @@ static int mpcpcibrprint(void *, const char *pnp); void mpcpcibus_find_ranges_32(struct pcibr_softc *, u_int32_t *, int); void mpcpcibus_find_ranges_64(struct pcibr_softc *, u_int32_t *, int); -struct pcibr_config mpc_config; - /* * config types * bit meanings @@ -379,7 +393,7 @@ mpcpcibrattach(struct device *parent, struct device *self, void *aux) } /* translate byte(s) into item count*/ - lcp = sc->sc_pcibr = &sc->pcibr_config; + lcp = &sc->pcibr_config; snprintf(sc->sc_ioex_name, sizeof(sc->sc_ioex_name), "%s pciio", sc->sc_dev.dv_xname); diff --git a/sys/arch/macppc/pci/pcibrvar.h b/sys/arch/macppc/pci/pcibrvar.h deleted file mode 100644 index 09e2abb277e..00000000000 --- a/sys/arch/macppc/pci/pcibrvar.h +++ /dev/null @@ -1,56 +0,0 @@ -/* $OpenBSD: pcibrvar.h,v 1.7 2009/05/03 21:30:09 kettenis Exp $ */ - -/* - * Copyright (c) 1997 Per Fogelstrom - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ - -#include <dev/pci/pcireg.h> -#include <dev/pci/pcivar.h> -#include <dev/pci/pcidevs.h> - -struct pcibr_config { - bus_space_tag_t lc_memt; - bus_space_tag_t lc_iot; - bus_space_handle_t ioh_cf8; - bus_space_handle_t ioh_cfc; - struct ppc_pci_chipset lc_pc; - int config_type; - int bus; - int pci_init_done; - int node; -}; - -struct pcibr_softc { - struct device sc_dev; - struct pcibr_config *sc_pcibr; - struct ppc_bus_space sc_membus_space; - struct ppc_bus_space sc_iobus_space; - struct powerpc_bus_dma_tag sc_dmatag; - struct pcibr_config pcibr_config; - struct extent *sc_ioex; - struct extent *sc_memex; - char sc_ioex_name[32]; - char sc_memex_name[32]; -}; |