diff options
| author | Andrew Gallatin <gallatin@FreeBSD.org> | 1999-05-20 15:33:33 +0000 |
|---|---|---|
| committer | Andrew Gallatin <gallatin@FreeBSD.org> | 1999-05-20 15:33:33 +0000 |
| commit | aa6de8e0129b3afe01fbd04ee6c520611856b083 (patch) | |
| tree | e41819f3df4422db90a22d6b97162e6802a595e6 /sys/alpha/pci | |
| parent | 80037d6e9e0c1d84a7ffeca4683222d6fada175f (diff) | |
Notes
Diffstat (limited to 'sys/alpha/pci')
| -rw-r--r-- | sys/alpha/pci/apecs.c | 26 | ||||
| -rw-r--r-- | sys/alpha/pci/apecs_pci.c | 14 | ||||
| -rw-r--r-- | sys/alpha/pci/cia.c | 26 | ||||
| -rw-r--r-- | sys/alpha/pci/cia_pci.c | 14 | ||||
| -rw-r--r-- | sys/alpha/pci/lca.c | 14 | ||||
| -rw-r--r-- | sys/alpha/pci/lca_pci.c | 14 | ||||
| -rw-r--r-- | sys/alpha/pci/pcibus.c | 24 |
7 files changed, 87 insertions, 45 deletions
diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index 951689499927..c6b0ac4e3f11 100644 --- a/sys/alpha/pci/apecs.c +++ b/sys/alpha/pci/apecs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: apecs.c,v 1.6 1999/04/16 21:21:38 peter Exp $ + * $Id: apecs.c,v 1.7 1999/05/08 21:58:40 dfr Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -323,44 +323,44 @@ apecs_swiz_writel(u_int32_t pa, u_int32_t data) #if 1 static u_int8_t -apecs_swiz_cfgreadb(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadb(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, BYTE, u_int8_t); } static u_int16_t -apecs_swiz_cfgreadw(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadw(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, WORD, u_int16_t); } static u_int32_t -apecs_swiz_cfgreadl(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadl(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, LONG, u_int32_t); } static void -apecs_swiz_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) +apecs_swiz_cfgwriteb(u_int h, u_int b, u_int s, u_int f, u_int r, u_int8_t data) { SWIZ_CFGWRITE(b, s, f, r, data, BYTE, u_int8_t); } static void -apecs_swiz_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) +apecs_swiz_cfgwritew(u_int h, u_int b, u_int s, u_int f, u_int r, u_int16_t data) { SWIZ_CFGWRITE(b, s, f, r, data, WORD, u_int16_t); } static void -apecs_swiz_cfgwritel(u_int b, u_int s, u_int f, u_int r, u_int32_t data) +apecs_swiz_cfgwritel(u_int h, u_int b, u_int s, u_int f, u_int r, u_int32_t data) { SWIZ_CFGWRITE(b, s, f, r, data, LONG, u_int32_t); } #else static u_int8_t -apecs_swiz_cfgreadb(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadb(u_int h, u_int b, u_int s, u_int f, u_int r) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); @@ -370,7 +370,7 @@ apecs_swiz_cfgreadb(u_int b, u_int s, u_int f, u_int r) } static u_int16_t -apecs_swiz_cfgreadw(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadw(u_int h, u_int b, u_int s, u_int f, u_int r) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); @@ -380,7 +380,7 @@ apecs_swiz_cfgreadw(u_int b, u_int s, u_int f, u_int r) } static u_int32_t -apecs_swiz_cfgreadl(u_int b, u_int s, u_int f, u_int r) +apecs_swiz_cfgreadl(u_int h, u_int b, u_int s, u_int f, u_int r) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); @@ -390,7 +390,7 @@ apecs_swiz_cfgreadl(u_int b, u_int s, u_int f, u_int r) } static void -apecs_swiz_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) +apecs_swiz_cfgwriteb(u_int h, u_int b, u_int s, u_int f, u_int r, u_int8_t data) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); @@ -400,7 +400,7 @@ apecs_swiz_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) } static void -apecs_swiz_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) +apecs_swiz_cfgwritew(u_int h, u_int b, u_int s, u_int f, u_int r, u_int16_t data) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); @@ -410,7 +410,7 @@ apecs_swiz_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) } static void -apecs_swiz_cfgwritel(u_int b, u_int s, u_int f, u_int r, u_int32_t data) +apecs_swiz_cfgwritel(u_int h, u_int b, u_int s, u_int f, u_int r, u_int32_t data) { struct apecs_softc* sc = APECS_SOFTC(apecs0); vm_offset_t off = APECS_SWIZ_CFGOFF(b, s, f, r); diff --git a/sys/alpha/pci/apecs_pci.c b/sys/alpha/pci/apecs_pci.c index cb05f8d9ecfc..918131783426 100644 --- a/sys/alpha/pci/apecs_pci.c +++ b/sys/alpha/pci/apecs_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: apecs_pci.c,v 1.1 1999/04/16 21:21:38 peter Exp $ + * $Id: apecs_pci.c,v 1.2 1999/05/08 21:58:41 dfr Exp $ */ #include <sys/param.h> @@ -33,6 +33,7 @@ #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> +#include <pci/pcivar.h> static devclass_t pcib_devclass; @@ -46,6 +47,16 @@ apecs_pcib_probe(device_t dev) return 0; } +static int +apecs_pcib_read_ivar(device_t dev, device_t child, int which, u_long *result) +{ + if (which == PCIB_IVAR_HOSE) { + *result = 0; + return 0; + } + return ENOENT; +} + static device_method_t apecs_pcib_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apecs_pcib_probe), @@ -53,6 +64,7 @@ static device_method_t apecs_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_read_ivar, apecs_pcib_read_ivar), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c index ca7032a13d27..aaa78b973694 100644 --- a/sys/alpha/pci/cia.c +++ b/sys/alpha/pci/cia.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cia.c,v 1.16 1999/04/16 21:21:39 peter Exp $ + * $Id: cia.c,v 1.17 1999/05/08 21:58:41 dfr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -332,7 +332,7 @@ cia_check_abort(void) | ((b) << 16) | ((s) << 11) | ((f) << 8) | (r)) static u_int8_t -cia_bwx_cfgreadb(u_int b, u_int s, u_int f, u_int r) +cia_bwx_cfgreadb(u_int h, u_int b, u_int s, u_int f, u_int r) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); u_int8_t data; @@ -348,7 +348,7 @@ cia_bwx_cfgreadb(u_int b, u_int s, u_int f, u_int r) } static u_int16_t -cia_bwx_cfgreadw(u_int b, u_int s, u_int f, u_int r) +cia_bwx_cfgreadw(u_int h, u_int b, u_int s, u_int f, u_int r) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); u_int16_t data; @@ -364,7 +364,7 @@ cia_bwx_cfgreadw(u_int b, u_int s, u_int f, u_int r) } static u_int32_t -cia_bwx_cfgreadl(u_int b, u_int s, u_int f, u_int r) +cia_bwx_cfgreadl(u_int h, u_int b, u_int s, u_int f, u_int r) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); u_int32_t data; @@ -380,7 +380,7 @@ cia_bwx_cfgreadl(u_int b, u_int s, u_int f, u_int r) } static void -cia_bwx_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) +cia_bwx_cfgwriteb(u_int h, u_int b, u_int s, u_int f, u_int r, u_int8_t data) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); cia_clear_abort(); @@ -390,7 +390,7 @@ cia_bwx_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) } static void -cia_bwx_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) +cia_bwx_cfgwritew(u_int h, u_int b, u_int s, u_int f, u_int r, u_int16_t data) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); if (badaddr((caddr_t)va, 2)) return; @@ -399,7 +399,7 @@ cia_bwx_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) } static void -cia_bwx_cfgwritel(u_int b, u_int s, u_int f, u_int r, u_int32_t data) +cia_bwx_cfgwritel(u_int h, u_int b, u_int s, u_int f, u_int r, u_int32_t data) { vm_offset_t va = CIA_BWX_CFGADDR(b, s, f, r); if (badaddr((caddr_t)va, 4)) return; @@ -579,37 +579,37 @@ cia_swiz_maxdevs(u_int b) return; static u_int8_t -cia_swiz_cfgreadb(u_int b, u_int s, u_int f, u_int r) +cia_swiz_cfgreadb(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, BYTE, u_int8_t); } static u_int16_t -cia_swiz_cfgreadw(u_int b, u_int s, u_int f, u_int r) +cia_swiz_cfgreadw(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, WORD, u_int16_t); } static u_int32_t -cia_swiz_cfgreadl(u_int b, u_int s, u_int f, u_int r) +cia_swiz_cfgreadl(u_int h, u_int b, u_int s, u_int f, u_int r) { SWIZ_CFGREAD(b, s, f, r, LONG, u_int32_t); } static void -cia_swiz_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) +cia_swiz_cfgwriteb(u_int h, u_int b, u_int s, u_int f, u_int r, u_int8_t data) { SWIZ_CFGWRITE(b, s, f, r, data, BYTE, u_int8_t); } static void -cia_swiz_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) +cia_swiz_cfgwritew(u_int h, u_int b, u_int s, u_int f, u_int r, u_int16_t data) { SWIZ_CFGWRITE(b, s, f, r, data, WORD, u_int16_t); } static void -cia_swiz_cfgwritel(u_int b, u_int s, u_int f, u_int r, u_int32_t data) +cia_swiz_cfgwritel(u_int h, u_int b, u_int s, u_int f, u_int r, u_int32_t data) { SWIZ_CFGWRITE(b, s, f, r, data, LONG, u_int32_t); } diff --git a/sys/alpha/pci/cia_pci.c b/sys/alpha/pci/cia_pci.c index 9b0c7d11c74a..fdf0016d65ce 100644 --- a/sys/alpha/pci/cia_pci.c +++ b/sys/alpha/pci/cia_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cia_pci.c,v 1.1 1999/04/16 21:21:39 peter Exp $ + * $Id: cia_pci.c,v 1.2 1999/05/08 21:58:42 dfr Exp $ */ #include <sys/param.h> @@ -33,6 +33,7 @@ #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> +#include <pci/pcivar.h> static devclass_t pcib_devclass; @@ -46,6 +47,16 @@ cia_pcib_probe(device_t dev) return 0; } +static int +cia_pcib_read_ivar(device_t dev, device_t child, int which, u_long *result) +{ + if (which == PCIB_IVAR_HOSE) { + *result = 0; + return 0; + } + return ENOENT; +} + static device_method_t cia_pcib_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cia_pcib_probe), @@ -53,6 +64,7 @@ static device_method_t cia_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_read_ivar, cia_pcib_read_ivar), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), diff --git a/sys/alpha/pci/lca.c b/sys/alpha/pci/lca.c index 6427c21d695a..f7868da0a114 100644 --- a/sys/alpha/pci/lca.c +++ b/sys/alpha/pci/lca.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lca.c,v 1.7 1999/05/08 21:58:43 dfr Exp $ + * $Id: lca.c,v 1.8 1999/05/10 15:46:38 peter Exp $ */ #include <sys/param.h> @@ -276,37 +276,37 @@ lca_maxdevs(u_int b) return static u_int8_t -lca_cfgreadb(u_int b, u_int s, u_int f, u_int r) +lca_cfgreadb(u_int h, u_int b, u_int s, u_int f, u_int r) { CFGREAD(b, s, f, r, BYTE, u_int8_t); } static u_int16_t -lca_cfgreadw(u_int b, u_int s, u_int f, u_int r) +lca_cfgreadw(u_int h, u_int b, u_int s, u_int f, u_int r) { CFGREAD(b, s, f, r, WORD, u_int16_t); } static u_int32_t -lca_cfgreadl(u_int b, u_int s, u_int f, u_int r) +lca_cfgreadl(u_int h, u_int b, u_int s, u_int f, u_int r) { CFGREAD(b, s, f, r, LONG, u_int32_t); } static void -lca_cfgwriteb(u_int b, u_int s, u_int f, u_int r, u_int8_t data) +lca_cfgwriteb(u_int h, u_int b, u_int s, u_int f, u_int r, u_int8_t data) { CFGWRITE(b, s, f, r, data, BYTE, u_int8_t); } static void -lca_cfgwritew(u_int b, u_int s, u_int f, u_int r, u_int16_t data) +lca_cfgwritew(u_int h, u_int b, u_int s, u_int f, u_int r, u_int16_t data) { CFGWRITE(b, s, f, r, data, WORD, u_int16_t); } static void -lca_cfgwritel(u_int b, u_int s, u_int f, u_int r, u_int32_t data) +lca_cfgwritel(u_int h, u_int b, u_int s, u_int f, u_int r, u_int32_t data) { CFGWRITE(b, s, f, r, data, LONG, u_int16_t); } diff --git a/sys/alpha/pci/lca_pci.c b/sys/alpha/pci/lca_pci.c index 7e84de424152..f74840fa4a0c 100644 --- a/sys/alpha/pci/lca_pci.c +++ b/sys/alpha/pci/lca_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lca_pci.c,v 1.1 1999/04/16 21:21:39 peter Exp $ + * $Id: lca_pci.c,v 1.2 1999/05/08 21:58:43 dfr Exp $ */ #include <sys/param.h> @@ -33,6 +33,7 @@ #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> +#include <pci/pcivar.h> static devclass_t pcib_devclass; @@ -46,6 +47,16 @@ lca_pcib_probe(device_t dev) return 0; } +static int +lca_pcib_read_ivar(device_t dev, device_t child, int which, u_long *result) +{ + if (which == PCIB_IVAR_HOSE) { + *result = 0; + return 0; + } + return ENOENT; +} + static device_method_t lca_pcib_methods[] = { /* Device interface */ DEVMETHOD(device_probe, lca_pcib_probe), @@ -53,6 +64,7 @@ static device_method_t lca_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_read_ivar, lca_pcib_read_ivar), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), diff --git a/sys/alpha/pci/pcibus.c b/sys/alpha/pci/pcibus.c index 0a1d672e328d..5b4cbf893063 100644 --- a/sys/alpha/pci/pcibus.c +++ b/sys/alpha/pci/pcibus.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcibus.c,v 1.12 1999/05/08 21:58:44 dfr Exp $ + * $Id: pcibus.c,v 1.13 1999/05/18 23:20:14 peter Exp $ * */ @@ -82,11 +82,14 @@ pci_cfgread(pcicfgregs *cfg, int reg, int bytes) { switch (bytes) { case 1: - return chipset.cfgreadb(cfg->bus, cfg->slot, cfg->func, reg); + return chipset.cfgreadb(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg); case 2: - return chipset.cfgreadw(cfg->bus, cfg->slot, cfg->func, reg); + return chipset.cfgreadw(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg); case 4: - return chipset.cfgreadl(cfg->bus, cfg->slot, cfg->func, reg); + return chipset.cfgreadl(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg); } return ~0; } @@ -99,11 +102,14 @@ pci_cfgwrite(pcicfgregs *cfg, int reg, int data, int bytes) { switch (bytes) { case 1: - return chipset.cfgwriteb(cfg->bus, cfg->slot, cfg->func, reg, data); + return chipset.cfgwriteb(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg, data); case 2: - return chipset.cfgwritew(cfg->bus, cfg->slot, cfg->func, reg, data); + return chipset.cfgwritew(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg, data); case 4: - return chipset.cfgwritel(cfg->bus, cfg->slot, cfg->func, reg, data); + return chipset.cfgwritel(cfg->hose, cfg->bus, + cfg->slot, cfg->func, reg, data); } } @@ -155,11 +161,11 @@ static struct rman irq_rman, port_rman, mem_rman; void pci_init_resources() { irq_rman.rm_start = 0; - irq_rman.rm_end = 32; + irq_rman.rm_end = 64; irq_rman.rm_type = RMAN_ARRAY; irq_rman.rm_descr = "PCI Interrupt request lines"; if (rman_init(&irq_rman) - || rman_manage_region(&irq_rman, 0, 31)) + || rman_manage_region(&irq_rman, 0, 63)) panic("pci_init_resources irq_rman"); port_rman.rm_start = 0; |
