diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-10-07 15:27:13 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-10-07 15:27:13 +0000 |
commit | 890e250f4bae043c9f2d7d6009eb9ac6492a2c2f (patch) | |
tree | b69bfe4632463ca0888d51b56be2e21d7bb8df6f /sys/arch | |
parent | e4d6e144ef867fb2f005e1246b759608a491a2bf (diff) |
remove all assumptions that parent is psycho. Also, don't try to use
iommu operations directly: that's what bus_dma(9) heirarchy is for.
(audioce now works on u5, though it won't play on the onboard speaker,
or mine is busted... plays fine in headphones/lineout).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/ebus.c | 41 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/ebusvar.h | 3 |
2 files changed, 11 insertions, 33 deletions
diff --git a/sys/arch/sparc64/dev/ebus.c b/sys/arch/sparc64/dev/ebus.c index 5fcdceacd9f..53c9d7a7383 100644 --- a/sys/arch/sparc64/dev/ebus.c +++ b/sys/arch/sparc64/dev/ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ebus.c,v 1.4 2001/10/01 16:55:57 jason Exp $ */ +/* $OpenBSD: ebus.c,v 1.5 2001/10/07 15:27:12 jason Exp $ */ /* $NetBSD: ebus.c,v 1.24 2001/07/25 03:49:54 eeh Exp $ */ /* @@ -174,11 +174,6 @@ ebus_attach(parent, self, aux) printf("\n"); - /* - * The "parent" of an ebus is the pci layer, in this case we - * really want the grandparent. - */ - sc->sc_parent = (struct psycho_softc *)parent->dv_parent; sc->sc_memtag = pa->pa_memt; sc->sc_iotag = pa->pa_iot; sc->sc_childbustag = ebus_alloc_bus_tag(sc, PCI_MEMORY_BUS_SPACE); @@ -548,7 +543,8 @@ ebus_intr_establish(t, pri, level, flags, handler, arg) int (*handler) __P((void *)); void *arg; { - return (bus_intr_establish(t->parent, pri, level, flags, handler, arg)); + return (bus_intr_establish(t->parent, pri, level, flags, + handler, arg)); } /* @@ -563,10 +559,7 @@ ebus_dmamap_load(t, map, buf, buflen, p, flags) struct proc *p; int flags; { - struct ebus_softc *sc = t->_cookie; - - return (iommu_dvmamap_load(t, sc->sc_parent->sc_is, map, buf, buflen, - p, flags)); + return (bus_dmamap_load(t->_parent, map, buf, buflen, p, flags)); } void @@ -574,9 +567,7 @@ ebus_dmamap_unload(t, map) bus_dma_tag_t t; bus_dmamap_t map; { - struct ebus_softc *sc = t->_cookie; - - iommu_dvmamap_unload(t, sc->sc_parent->sc_is, map); + bus_dmamap_unload(t->_parent, map); } void @@ -587,9 +578,6 @@ ebus_dmamap_sync(t, map, offset, len, ops) bus_size_t len; int ops; { - struct ebus_softc *sc = t->_cookie; - - iommu_dvmamap_sync(t, sc->sc_parent->sc_is, map, offset, len, ops); bus_dmamap_sync(t->_parent, map, offset, len, ops); } @@ -604,10 +592,8 @@ ebus_dmamem_alloc(t, size, alignment, boundary, segs, nsegs, rsegs, flags) int *rsegs; int flags; { - struct ebus_softc *sc = t->_cookie; - - return (iommu_dvmamem_alloc(t, sc->sc_parent->sc_is, size, alignment, - boundary, segs, nsegs, rsegs, flags)); + return (bus_dmamem_alloc(t->_parent, size, alignment, boundary, segs, + nsegs, rsegs, flags)); } void @@ -616,9 +602,7 @@ ebus_dmamem_free(t, segs, nsegs) bus_dma_segment_t *segs; int nsegs; { - struct ebus_softc *sc = t->_cookie; - - iommu_dvmamem_free(t, sc->sc_parent->sc_is, segs, nsegs); + bus_dmamem_free(t->_parent, segs, nsegs); } int @@ -630,10 +614,7 @@ ebus_dmamem_map(t, segs, nsegs, size, kvap, flags) caddr_t *kvap; int flags; { - struct ebus_softc *sc = t->_cookie; - - return (iommu_dvmamem_map(t, sc->sc_parent->sc_is, segs, nsegs, - size, kvap, flags)); + return (bus_dmamem_map(t->_parent, segs, nsegs, size, kvap, flags)); } void @@ -642,7 +623,5 @@ ebus_dmamem_unmap(t, kva, size) caddr_t kva; size_t size; { - struct ebus_softc *sc = t->_cookie; - - iommu_dvmamem_unmap(t, sc->sc_parent->sc_is, kva, size); + return (bus_dmamem_unmap(t->_parent, kva, size)); } diff --git a/sys/arch/sparc64/dev/ebusvar.h b/sys/arch/sparc64/dev/ebusvar.h index d64697a27b6..c5008189ef1 100644 --- a/sys/arch/sparc64/dev/ebusvar.h +++ b/sys/arch/sparc64/dev/ebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ebusvar.h,v 1.2 2001/08/20 20:23:52 jason Exp $ */ +/* $OpenBSD: ebusvar.h,v 1.3 2001/10/07 15:27:12 jason Exp $ */ /* $NetBSD: ebusvar.h,v 1.5 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -55,7 +55,6 @@ struct ebus_attach_args { struct ebus_softc { struct device sc_dev; - struct psycho_softc *sc_parent; /* for iommu */ int sc_node; |