diff --git a/sys/arch/arm/ixp12x0/ixp12x0.c b/sys/arch/arm/ixp12x0/ixp12x0.c index fd01bd82c4b3..1c70427a12b5 100644 --- a/sys/arch/arm/ixp12x0/ixp12x0.c +++ b/sys/arch/arm/ixp12x0/ixp12x0.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0.c,v 1.10 2003/07/13 02:11:58 igy Exp $ */ +/* $NetBSD: ixp12x0.c,v 1.11 2003/07/13 07:15:22 igy Exp $ */ /* * Copyright (c) 2002, 2003 * Ichiro FUKUHARA . @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixp12x0.c,v 1.10 2003/07/13 02:11:58 igy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0.c,v 1.11 2003/07/13 07:15:22 igy Exp $"); #include #include @@ -60,26 +60,24 @@ ixp12x0_attach(sc) ixp12x0_softc = sc; printf("\n"); + + sc->sc_iot = &ixp12x0_bs_tag; + /* - * Subregion for PCI Configuration Spase Registers + * Mapping for PCI Configuration Spase Registers */ - if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, - IXP12X0_PCI_VBASE - IXP12X0_IO_VBASE, - IXP12X0_PCI_SIZE, &sc->sc_pci_ioh)) - panic("%s: unable to subregion PCI registers", - sc->sc_dev.dv_xname); + if (bus_space_map(sc->sc_iot, IXP12X0_PCI_HWBASE, IXP12X0_PCI_SIZE, + 0, &sc->sc_pci_ioh)) + panic("%s: unable to map PCI registers", sc->sc_dev.dv_xname); + if (bus_space_map(sc->sc_iot, IXP12X0_PCI_TYPE0_HWBASE, + IXP12X0_PCI_TYPE0_SIZE, 0, &sc->sc_conf0_ioh)) + panic("%s: unable to map PCI Configutation 0\n", + sc->sc_dev.dv_xname); + if (bus_space_map(sc->sc_iot, IXP12X0_PCI_TYPE1_HWBASE, + IXP12X0_PCI_TYPE0_SIZE, 1, &sc->sc_conf1_ioh)) + panic("%s: unable to map PCI Configutation 1\n", + sc->sc_dev.dv_xname); - if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, - IXP12X0_PCI_TYPE0_VBASE - IXP12X0_IO_VBASE, - IXP12X0_PCI_TYPE0_SIZE, &sc->sc_conf0_ioh)) - panic("%s: unable to subregion PCI Configutation 0\n", - sc->sc_dev.dv_xname); - - if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, - IXP12X0_PCI_TYPE1_VBASE - IXP12X0_IO_VBASE, - IXP12X0_PCI_TYPE1_SIZE, &sc->sc_conf1_ioh)) - panic("%s: unable to subregion PCI Configutation 1\n", - sc->sc_dev.dv_xname); /* * PCI bus reset */ diff --git a/sys/arch/arm/ixp12x0/ixp12x0_io.c b/sys/arch/arm/ixp12x0/ixp12x0_io.c index d33cec859376..0ea271a3543d 100644 --- a/sys/arch/arm/ixp12x0/ixp12x0_io.c +++ b/sys/arch/arm/ixp12x0/ixp12x0_io.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0_io.c,v 1.8 2003/07/13 02:11:58 igy Exp $ */ +/* $NetBSD: ixp12x0_io.c,v 1.9 2003/07/13 07:15:22 igy Exp $ */ /* * Copyright (c) 2002, 2003 @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixp12x0_io.c,v 1.8 2003/07/13 02:11:58 igy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0_io.c,v 1.9 2003/07/13 07:15:22 igy Exp $"); /* * bus_space I/O functions for ixp12x0 @@ -134,15 +134,6 @@ struct bus_space ixp12x0_bs_tag = { bs_notimpl_bs_c_8, }; -void -ixp12x0_bs_init(bs, cookie) - bus_space_tag_t bs; - void *cookie; -{ - *bs = ixp12x0_bs_tag; - bs->bs_cookie = cookie; -} - /* Common routines */ int diff --git a/sys/arch/arm/ixp12x0/ixp12x0var.h b/sys/arch/arm/ixp12x0/ixp12x0var.h index c64cc3c7ddab..a13a125bd4d4 100644 --- a/sys/arch/arm/ixp12x0/ixp12x0var.h +++ b/sys/arch/arm/ixp12x0/ixp12x0var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0var.h,v 1.4 2003/07/13 02:11:58 igy Exp $ */ +/* $NetBSD: ixp12x0var.h,v 1.5 2003/07/13 07:15:23 igy Exp $ */ /* * Copyright (c) 2002 * Ichiro FUKUHARA . @@ -103,9 +103,6 @@ struct pmap_ent { extern struct bus_space ixp12x0_bs_tag; -void ixp12x0_bs_init(bus_space_tag_t, void *); -void ixp12x0_io_bs_init(bus_space_tag_t, void *); -void ixp12x0_mem_bs_init(bus_space_tag_t, void *); void ixp12x0_pci_init(pci_chipset_tag_t, void *); void ixp12x0_pci_dma_init(struct ixp12x0_softc *); void ixp12x0_attach(struct ixp12x0_softc *); diff --git a/sys/arch/evbarm/ixm1200/ixp12x0_mainbus.c b/sys/arch/evbarm/ixm1200/ixp12x0_mainbus.c index 8bdb94b2954a..60e814b0a02f 100644 --- a/sys/arch/evbarm/ixm1200/ixp12x0_mainbus.c +++ b/sys/arch/evbarm/ixm1200/ixp12x0_mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0_mainbus.c,v 1.5 2003/03/25 06:53:16 igy Exp $ */ +/* $NetBSD: ixp12x0_mainbus.c,v 1.6 2003/07/13 07:15:23 igy Exp $ */ /* * Copyright (c) 2002 * Ichiro FUKUHARA . @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixp12x0_mainbus.c,v 1.5 2003/03/25 06:53:16 igy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0_mainbus.c,v 1.6 2003/07/13 07:15:23 igy Exp $"); /* * front-end for the ixp12x0 I/O Processor. @@ -73,10 +73,6 @@ ixp12x0_mainbus_attach(struct device *parent, struct device *self, void *aux) { struct ixp12x0_softc *sc = (void *) self; - ixp12x0_bs_init(&ixp12x0_bs_tag, sc); - sc->sc_iot = &ixp12x0_bs_tag; - sc->sc_ioh = IXP12X0_IO_VBASE; - /* * Initialize the interrupt part of our PCI chipset tag */