summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/dma_sbus.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-08-20 19:34:11 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-08-20 19:34:11 +0000
commitf24eeeec3eb0478e82f8bd8037b7a7d20f12d8a2 (patch)
tree1d6b17d5fbdcc10a550f04f1c492b121919cd8e7 /sys/dev/sbus/dma_sbus.c
parent6b089005b7c77c07e099ba5c1fe6770b89c6a33f (diff)
modifications to support OpenBSD/sparc style bootpath determination
Diffstat (limited to 'sys/dev/sbus/dma_sbus.c')
-rw-r--r--sys/dev/sbus/dma_sbus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/sbus/dma_sbus.c b/sys/dev/sbus/dma_sbus.c
index 2b435244a42..8e018a67e46 100644
--- a/sys/dev/sbus/dma_sbus.c
+++ b/sys/dev/sbus/dma_sbus.c
@@ -156,6 +156,7 @@ dmaattach_sbus(parent, self, aux)
struct sbus_attach_args *sa = aux;
struct dma_softc *dsc = (void *)self;
struct lsi64854_softc *sc = &dsc->sc_lsi64854;
+ struct bootpath *bp;
bus_space_handle_t bh;
bus_space_tag_t sbt;
int sbusburst, burst;
@@ -230,11 +231,21 @@ dmaattach_sbus(parent, self, aux)
sbt = dma_alloc_bustag(dsc);
lsi64854_attach(sc);
+ bp = sa->sa_bp;
+ if (bp != NULL &&
+ (strcmp(bp->name, "espdma") == 0 ||
+ strcmp(bp->name, "ledma") == 0 ||
+ strcmp(bp->name, "dma") == 0))
+ bp = bp + 1;
+ else
+ bp = NULL;
+
/* Attach children */
for (node = firstchild(sa->sa_node); node; node = nextsibling(node)) {
struct sbus_attach_args sa;
sbus_setup_attach_args((struct sbus_softc *)parent,
sbt, sc->sc_dmatag, node, &sa);
+ sa.sa_bp = bp;
(void) config_found(&sc->sc_dev, (void *)&sa, dmaprint_sbus);
sbus_destroy_attach_args(&sa);
}