summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-01-18 18:58:41 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-01-18 18:58:41 +0000
commit8f776238c77d14d76996c21a2ef931dd46d07c52 (patch)
treef33eb22f4023010d5568ea476e62338d31d1b4b9 /sys/dev/isa
parente48ef09d84ca7e1fb62143e3ee21e13dab2730ed (diff)
move to current OpenBSD isadma API
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/ad1848.c10
-rw-r--r--sys/dev/isa/bt.c4
-rw-r--r--sys/dev/isa/gus.c33
-rw-r--r--sys/dev/isa/if_le_isa.c4
-rw-r--r--sys/dev/isa/if_le_isapnp.c4
-rw-r--r--sys/dev/isa/sbdsp.c13
-rw-r--r--sys/dev/isa/uha_isa.c4
-rw-r--r--sys/dev/isa/wt.c10
8 files changed, 39 insertions, 43 deletions
diff --git a/sys/dev/isa/ad1848.c b/sys/dev/isa/ad1848.c
index ff674851a92..9a7ed0fc629 100644
--- a/sys/dev/isa/ad1848.c
+++ b/sys/dev/isa/ad1848.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad1848.c,v 1.8 1997/07/10 23:06:31 provos Exp $ */
+/* $OpenBSD: ad1848.c,v 1.9 1998/01/18 18:58:36 niklas Exp $ */
/* $NetBSD: ad1848.c,v 1.10 1996/04/29 20:02:32 christos Exp $ */
/*
@@ -283,7 +283,7 @@ ad1848_forceintr(sc)
* it is needed (and you pay the latency). Also, you might
* never need the buffer anyway.)
*/
- isa_dmastart(DMAMODE_READ, &dmabuf, 1, sc->sc_drq);
+ isadma_start(&dmabuf, 1, sc->sc_drq, DMAMODE_READ);
ad_write(sc, SP_LOWER_BASE_COUNT, 0);
ad_write(sc, SP_UPPER_BASE_COUNT, 0);
@@ -1446,7 +1446,7 @@ ad1848_dma_input(addr, p, cc, intr, arg)
sc->sc_dma_flags = DMAMODE_READ;
sc->sc_dma_bp = p;
sc->sc_dma_cnt = cc;
- isa_dmastart(DMAMODE_READ, p, cc, sc->sc_recdrq);
+ isadma_start(p, cc, sc->sc_recdrq, DMAMODE_READ);
if (sc->precision == 16)
cc >>= 1;
@@ -1500,7 +1500,7 @@ ad1848_dma_output(addr, p, cc, intr, arg)
sc->sc_dma_flags = DMAMODE_WRITE;
sc->sc_dma_bp = p;
sc->sc_dma_cnt = cc;
- isa_dmastart(DMAMODE_WRITE, p, cc, sc->sc_drq);
+ isadma_start(p, cc, sc->sc_drq, DMAMODE_WRITE);
if (sc->precision == 16)
cc >>= 1;
@@ -1544,7 +1544,7 @@ ad1848_intr(arg)
/* ACK DMA read because it may be in a bounce buffer */
/* XXX Do write to mask DMA ? */
if (sc->sc_dma_flags & DMAMODE_READ)
- isa_dmadone(sc->sc_dma_flags, sc->sc_dma_bp, sc->sc_dma_cnt - 1, sc->sc_recdrq);
+ isadma_done(sc->sc_recdrq);
(*sc->sc_intr)(sc->sc_arg);
retval = 1;
}
diff --git a/sys/dev/isa/bt.c b/sys/dev/isa/bt.c
index 2c114315713..308ea2bf29e 100644
--- a/sys/dev/isa/bt.c
+++ b/sys/dev/isa/bt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt.c,v 1.21 1997/01/22 22:47:50 deraadt Exp $ */
+/* $OpenBSD: bt.c,v 1.22 1998/01/18 18:58:40 niklas Exp $ */
/* $NetBSD: bt.c,v 1.10 1996/05/12 23:51:54 mycroft Exp $ */
#undef BTDIAG
@@ -358,7 +358,7 @@ btattach(parent, self, aux)
sc->sc_iobase = ia->ia_iobase;
if (sc->sc_drq != DRQUNK)
- isa_dmacascade(sc->sc_drq);
+ isadma_cascade(sc->sc_drq);
bt_inquire_setup_information(sc);
bt_init(sc);
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c
index 85d140414cd..8922f8889f7 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gus.c,v 1.12 1997/07/10 23:06:34 provos Exp $ */
+/* $OpenBSD: gus.c,v 1.13 1998/01/18 18:58:37 niklas Exp $ */
/* $NetBSD: gus.c,v 1.16 1996/05/12 23:52:08 mycroft Exp $ */
/*-
@@ -217,14 +217,14 @@ struct gus_softc {
void (*sc_dmaoutintr) __P((void*)); /* DMA completion intr handler */
void *sc_outarg; /* argument for sc_dmaoutintr() */
- u_char *sc_dmaoutaddr; /* for isa_dmadone */
+ u_char *sc_dmaoutaddr; /* for isadma_done */
u_long sc_gusaddr; /* where did we just put it? */
- int sc_dmaoutcnt; /* for isa_dmadone */
+ int sc_dmaoutcnt; /* for isadma_done */
void (*sc_dmainintr) __P((void*)); /* DMA completion intr handler */
void *sc_inarg; /* argument for sc_dmaoutintr() */
- u_char *sc_dmainaddr; /* for isa_dmadone */
- int sc_dmaincnt; /* for isa_dmadone */
+ u_char *sc_dmainaddr; /* for isadma_done */
+ int sc_dmaincnt; /* for isadma_done */
struct stereo_dma_intr {
void (*intr)__P((void *));
@@ -1366,7 +1366,7 @@ gus_dmaout_timeout(arg)
outb(sc->sc_iobase+GUS_DATA_HIGH, 0);
#if 0
- isa_dmaabort(sc->sc_drq); /* XXX we will dmadone below? */
+ isadma_abort(sc->sc_drq); /* XXX we will dmadone below? */
#endif
gus_dmaout_dointr(sc);
@@ -1406,10 +1406,7 @@ gus_dmaout_dointr(sc)
register int port = sc->sc_iobase;
/* sc->sc_dmaoutcnt - 1 because DMA controller counts from zero?. */
- isa_dmadone(DMAMODE_WRITE,
- sc->sc_dmaoutaddr,
- sc->sc_dmaoutcnt - 1,
- sc->sc_drq);
+ isadma_done(sc->sc_drq);
sc->sc_flags &= ~GUS_DMAOUT_ACTIVE; /* pending DMA is done */
DMAPRINTF(("gus_dmaout_dointr %d @ %x\n", sc->sc_dmaoutcnt,
sc->sc_dmaoutaddr));
@@ -1915,7 +1912,7 @@ gusdmaout(sc, flags, gusaddr, buffaddr, length)
sc->sc_dmaoutaddr = (u_char *) buffaddr;
sc->sc_dmaoutcnt = length;
- isa_dmastart(DMAMODE_WRITE, buffaddr, length, sc->sc_drq);
+ isadma_start(buffaddr, length, sc->sc_drq, DMAMODE_WRITE);
/*
* Set up DMA address - use the upper 16 bits ONLY
@@ -3225,9 +3222,9 @@ gus_dma_input(addr, buf, size, callback, arg)
dmac |= GUSMASK_SAMPLE_INVBIT;
if (sc->sc_channels == 2)
dmac |= GUSMASK_SAMPLE_STEREO;
- isa_dmastart(DMAMODE_READ, (caddr_t) buf, size, sc->sc_recdrq);
+ isadma_start((caddr_t)buf, size, sc->sc_recdrq, DMAMODE_READ);
- DMAPRINTF(("gus_dma_input isa_dmastarted\n"));
+ DMAPRINTF(("gus_dma_input isadma_started\n"));
sc->sc_flags |= GUS_DMAIN_ACTIVE;
sc->sc_dmainintr = callback;
sc->sc_inarg = arg;
@@ -3252,8 +3249,7 @@ gus_dmain_intr(sc)
DMAPRINTF(("gus_dmain_intr called\n"));
if (sc->sc_dmainintr) {
- isa_dmadone(DMAMODE_READ, sc->sc_dmainaddr, sc->sc_dmaincnt - 1,
- sc->sc_recdrq);
+ isadma_done(sc->sc_recdrq);
callback = sc->sc_dmainintr;
arg = sc->sc_inarg;
@@ -3324,7 +3320,7 @@ gus_halt_out_dma(addr)
outb(sc->sc_iobase+GUS_DATA_HIGH, 0);
untimeout(gus_dmaout_timeout, sc);
- isa_dmaabort(sc->sc_drq);
+ isadma_abort(sc->sc_drq);
sc->sc_flags &= ~(GUS_DMAOUT_ACTIVE|GUS_LOCKED);
sc->sc_dmaoutintr = 0;
sc->sc_outarg = 0;
@@ -3357,9 +3353,10 @@ gus_halt_in_dma(addr)
SELECT_GUS_REG(port, GUSREG_SAMPLE_CONTROL);
outb(port+GUS_DATA_HIGH,
- inb(port+GUS_DATA_HIGH) & ~(GUSMASK_SAMPLE_START|GUSMASK_SAMPLE_IRQ));
+ inb(port+GUS_DATA_HIGH) &
+ ~(GUSMASK_SAMPLE_START|GUSMASK_SAMPLE_IRQ));
- isa_dmaabort(sc->sc_recdrq);
+ isadma_abort(sc->sc_recdrq);
sc->sc_flags &= ~GUS_DMAIN_ACTIVE;
sc->sc_dmainintr = 0;
sc->sc_inarg = 0;
diff --git a/sys/dev/isa/if_le_isa.c b/sys/dev/isa/if_le_isa.c
index c1e6aeb54af..5fe104c326c 100644
--- a/sys/dev/isa/if_le_isa.c
+++ b/sys/dev/isa/if_le_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_isa.c,v 1.10 1997/12/26 23:44:21 deraadt Exp $ */
+/* $OpenBSD: if_le_isa.c,v 1.11 1998/01/18 18:58:38 niklas Exp $ */
/* $NetBSD: if_le_isa.c,v 1.2 1996/05/12 23:52:56 mycroft Exp $ */
/*-
@@ -372,7 +372,7 @@ le_isa_attach(parent, self, aux)
#if NISADMA > 0
if (ia->ia_drq != DRQUNK)
- isa_dmacascade(ia->ia_drq);
+ isadma_cascade(ia->ia_drq);
#endif
lesc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
diff --git a/sys/dev/isa/if_le_isapnp.c b/sys/dev/isa/if_le_isapnp.c
index ed5bd8d4732..17612ea5229 100644
--- a/sys/dev/isa/if_le_isapnp.c
+++ b/sys/dev/isa/if_le_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_isapnp.c,v 1.4 1997/12/26 23:44:22 deraadt Exp $ */
+/* $OpenBSD: if_le_isapnp.c,v 1.5 1998/01/18 18:58:38 niklas Exp $ */
/* $NetBSD: if_le_isa.c,v 1.2 1996/05/12 23:52:56 mycroft Exp $ */
/*-
@@ -136,7 +136,7 @@ le_isapnp_attach(parent, self, aux)
#if NISADMA > 0
if (ia->ia_drq != DRQUNK)
- isa_dmacascade(ia->ia_drq);
+ isadma_cascade(ia->ia_drq);
#endif
lesc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c
index 35a24e7b41e..ca7ebb359d2 100644
--- a/sys/dev/isa/sbdsp.c
+++ b/sys/dev/isa/sbdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbdsp.c,v 1.10 1997/07/10 23:06:38 provos Exp $ */
+/* $OpenBSD: sbdsp.c,v 1.11 1998/01/18 18:58:39 niklas Exp $ */
/* $NetBSD: sbdsp.c,v 1.30 1996/10/25 07:25:48 fvdl Exp $ */
/*
@@ -771,7 +771,7 @@ sbdsp_reset(sc)
sc->sc_intr = 0;
if (sc->sc_dmadir != SB_DMA_NONE) {
- isa_dmaabort(sc->dmachan);
+ isadma_abort(sc->dmachan);
sc->sc_dmadir = SB_DMA_NONE;
}
sc->sc_last_hs_size = 0;
@@ -1167,7 +1167,7 @@ sbdsp_dma_input(addr, p, cc, intr, arg)
sc->dmaaddr = p;
sc->dmacnt = ISSB2CLASS(sc) ? (NBPG/cc)*cc : cc;
sc->dmachan = sc->sc_precision == 16 ? sc->sc_drq16 : sc->sc_drq8;
- isa_dmastart(sc->dmaflags, sc->dmaaddr, sc->dmacnt, sc->dmachan);
+ isadma_start(sc->dmaaddr, sc->dmacnt, sc->dmachan, sc->dmaflags);
sc->sc_intr = intr;
sc->sc_arg = arg;
@@ -1285,7 +1285,7 @@ sbdsp_dma_output(addr, p, cc, intr, arg)
sc->dmaaddr = p;
sc->dmacnt = ISSB2CLASS(sc) ? (NBPG/cc)*cc : cc;
sc->dmachan = sc->sc_precision == 16 ? sc->sc_drq16 : sc->sc_drq8;
- isa_dmastart(sc->dmaflags, sc->dmaaddr, sc->dmacnt, sc->dmachan);
+ isadma_start(sc->dmaaddr, sc->dmacnt, sc->dmachan, sc->dmaflags);
sc->sc_intr = intr;
sc->sc_arg = arg;
@@ -1357,7 +1357,7 @@ sbdsp_intr(arg)
if ((x & 3) == 0)
return 0;
}
- /* isa_dmafinished() moved to isadma.c */
+ /* isadma_finished() moved to isadma.c */
sc->sc_interrupts++;
delay(10);
#if 0
@@ -1372,8 +1372,7 @@ sbdsp_intr(arg)
sc->sc_precision == 16 ? SBP_DSP_IRQACK16 :
SBP_DSP_IRQACK8);
if (!ISSB2CLASS(sc))
- isa_dmadone(sc->dmaflags, sc->dmaaddr, sc->dmacnt,
- sc->dmachan);
+ isadma_done(sc->dmachan);
(*sc->sc_intr)(sc->sc_arg);
} else {
return 0;
diff --git a/sys/dev/isa/uha_isa.c b/sys/dev/isa/uha_isa.c
index f8577c6e5d4..1ef1ce52078 100644
--- a/sys/dev/isa/uha_isa.c
+++ b/sys/dev/isa/uha_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha_isa.c,v 1.2 1997/04/13 20:22:42 mickey Exp $ */
+/* $OpenBSD: uha_isa.c,v 1.3 1998/01/18 18:58:39 niklas Exp $ */
/* $NetBSD: uha_isa.c,v 1.5 1996/10/21 22:41:21 thorpej Exp $ */
/*
@@ -132,7 +132,7 @@ uha_isa_attach(parent, self, aux)
panic("uha_attach: u14_find failed!");
if (sc->sc_drq != -1)
- isa_dmacascade(sc->sc_drq);
+ isadma_cascade(sc->sc_drq);
sc->sc_ih = isa_intr_establish(ic, sc->sc_irq, IST_EDGE, IPL_BIO,
u14_intr, sc, sc->sc_dev.dv_xname);
diff --git a/sys/dev/isa/wt.c b/sys/dev/isa/wt.c
index f98bf73ac7a..672324787cb 100644
--- a/sys/dev/isa/wt.c
+++ b/sys/dev/isa/wt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wt.c,v 1.11 1996/09/01 16:42:24 deraadt Exp $ */
+/* $OpenBSD: wt.c,v 1.12 1998/01/18 18:58:40 niklas Exp $ */
/* $NetBSD: wt.c,v 1.33 1996/05/12 23:54:22 mycroft Exp $ */
/*
@@ -693,10 +693,10 @@ wtintr(arg)
(sc->dmatotal - sc->dmacount) < sc->bsize) {
/* If reading short block, copy the internal buffer
* to the user memory. */
- isa_dmadone(sc->dmaflags, sc->buf, sc->bsize, sc->chan);
+ isadma_done(sc->chan);
bcopy(sc->buf, sc->dmavaddr, sc->dmatotal - sc->dmacount);
} else
- isa_dmadone(sc->dmaflags, sc->dmavaddr, sc->bsize, sc->chan);
+ isadma_done(sc->chan);
/*
* On exception, check for end of file and end of volume.
@@ -882,9 +882,9 @@ wtdma(sc)
if ((sc->dmaflags & DMAMODE_READ) &&
(sc->dmatotal - sc->dmacount) < sc->bsize) {
/* Reading short block; do it through the internal buffer. */
- isa_dmastart(sc->dmaflags, sc->buf, sc->bsize, sc->chan);
+ isadma_start(sc->buf, sc->bsize, sc->chan, sc->dmaflags);
} else
- isa_dmastart(sc->dmaflags, sc->dmavaddr, sc->bsize, sc->chan);
+ isadma_start(sc->dmavaddr, sc->bsize, sc->chan, sc->dmaflags);
}
/* start i/o operation */