summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-24 17:26:26 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-24 17:26:26 +0000
commit77fe2df75e23cea2c9d62e5b25a796c31a221234 (patch)
treec1a0bcd07c4eba877c38dd63875dfffcb5535ac9 /sys/arch/amiga/dev
parent6d636619d1bb24932306f0a341fa7ae66050828f (diff)
Use IPL_ constants instead of numeric values. Get rid of sicallbacks
in favour of the remapped IPL facility. Some argument type fixes as well.
Diffstat (limited to 'sys/arch/amiga/dev')
-rw-r--r--sys/arch/amiga/dev/clock.c6
-rw-r--r--sys/arch/amiga/dev/mfc.c18
-rw-r--r--sys/arch/amiga/dev/mgnsc.c9
-rw-r--r--sys/arch/amiga/dev/zssc.c10
4 files changed, 31 insertions, 12 deletions
diff --git a/sys/arch/amiga/dev/clock.c b/sys/arch/amiga/dev/clock.c
index c30284cdd60..481841c958f 100644
--- a/sys/arch/amiga/dev/clock.c
+++ b/sys/arch/amiga/dev/clock.c
@@ -182,7 +182,7 @@ cpu_initclocks()
#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
isr.isr_intr = clockintr;
isr.isr_ipl = 6;
- isr.isr_mapped_ipl = 4;
+ isr.isr_mapped_ipl = IPL_CLOCK;
add_isr(&isr);
#else
/*
@@ -265,7 +265,7 @@ setmicspertick()
*/
void
delay(mic)
- int mic;
+ u_int mic;
{
u_int temp;
int s;
@@ -348,7 +348,7 @@ delay(mic)
*/
void
DELAY(mic)
- int mic;
+ u_int mic;
{
u_long n;
short hpos;
diff --git a/sys/arch/amiga/dev/mfc.c b/sys/arch/amiga/dev/mfc.c
index f0c7280e93b..f9f4a037e87 100644
--- a/sys/arch/amiga/dev/mfc.c
+++ b/sys/arch/amiga/dev/mfc.c
@@ -47,6 +47,7 @@
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/queue.h>
+#include <machine/psl.h>
#include <machine/cpu.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/isr.h>
@@ -363,7 +364,7 @@ mfcattach(pdp, dp, auxp)
scc->sc_isr.isr_arg = scc;
scc->sc_isr.isr_ipl = 6;
#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
- scc->sc_isr.isr_mapped_ipl = 3;
+ scc->sc_isr.isr_mapped_ipl = IPL_TTY;
#endif
add_isr(&scc->sc_isr);
@@ -994,10 +995,16 @@ mfcintr (scc)
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
scc->imask &= ~0x01;
regs->du_imr = scc->imask;
+#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
+ if (tp->t_line)
+ (*linesw[tp->t_line].l_start)(tp);
+ else
+ mfcsstart(tp);
+#else
add_sicallback (tp->t_line ?
(sifunc_t)linesw[tp->t_line].l_start
: (sifunc_t)mfcsstart, tp, NULL);
-
+#endif
}
else
regs->du_tba = *sc->ptr++;
@@ -1009,9 +1016,16 @@ mfcintr (scc)
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
scc->imask &= ~0x10;
regs->du_imr = scc->imask;
+#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
+ if (tp->t_line)
+ (*linesw[tp->t_line].l_start)(tp);
+ else
+ mfcsstart(tp);
+#else
add_sicallback (tp->t_line ?
(sifunc_t)linesw[tp->t_line].l_start
: (sifunc_t)mfcsstart, tp, NULL);
+#endif
}
else
regs->du_tbb = *sc->ptr++;
diff --git a/sys/arch/amiga/dev/mgnsc.c b/sys/arch/amiga/dev/mgnsc.c
index acec614d184..f67148f003c 100644
--- a/sys/arch/amiga/dev/mgnsc.c
+++ b/sys/arch/amiga/dev/mgnsc.c
@@ -40,6 +40,7 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
+#include <machine/psl.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
#include <amiga/amiga/custom.h>
@@ -130,8 +131,7 @@ mgnscattach(pdp, dp, auxp)
sc->sc_isr.isr_arg = sc;
sc->sc_isr.isr_ipl = 6;
#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
- /* XXX Don't remap it yet, the driver uses a sicallback still. */
- sc->sc_isr.isr_mapped_ipl = 6;
+ sc->sc_isr.isr_mapped_ipl = IPL_BIO;
#endif
add_isr (&sc->sc_isr);
@@ -189,8 +189,11 @@ mgnsc_dmaintr(sc)
rp->siop_sien = 0;
rp->siop_dien = 0;
sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF;
+#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
+ siopintr(sc);
+#else
add_sicallback((sifunc_t)siopintr, sc, NULL);
- return (1);
+#endif return (1);
}
#ifdef DEBUG
diff --git a/sys/arch/amiga/dev/zssc.c b/sys/arch/amiga/dev/zssc.c
index 36510a01ab1..16499b2790e 100644
--- a/sys/arch/amiga/dev/zssc.c
+++ b/sys/arch/amiga/dev/zssc.c
@@ -32,14 +32,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * @(#)dma.c
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
+#include <machine/psl.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
#include <amiga/amiga/custom.h>
@@ -131,8 +130,7 @@ zsscattach(pdp, dp, auxp)
sc->sc_isr.isr_arg = sc;
sc->sc_isr.isr_ipl = 6;
#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
- /* XXX Don't remap it yet, the driver uses a sicallback still. */
- sc->sc_isr.isr_mapped_ipl = 6;
+ sc->sc_isr.isr_mapped_ipl = IPL_BIO;
#endif
add_isr(&sc->sc_isr);
@@ -191,7 +189,11 @@ zssc_dmaintr(sc)
rp->siop_sien = 0;
rp->siop_dien = 0;
sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF;
+#if defined(IPL_REMAP_1) || defined(IPL_REMAP_2)
+ siopintr(sc);
+#else
add_sicallback((sifunc_t)siopintr, sc, NULL);
+#endif
return(1);
}