summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/isa/fd.c7
-rw-r--r--sys/arch/i386/isa/isa_machdep.c32
-rw-r--r--sys/arch/i386/isa/pccons.c12
-rw-r--r--sys/arch/i386/isa/pms.c32
-rw-r--r--sys/dev/isa/fd.c7
5 files changed, 43 insertions, 47 deletions
diff --git a/sys/arch/i386/isa/fd.c b/sys/arch/i386/isa/fd.c
index 91ab422a591..45564bd20b9 100644
--- a/sys/arch/i386/isa/fd.c
+++ b/sys/arch/i386/isa/fd.c
@@ -1,4 +1,5 @@
-/* $NetBSD: fd.c,v 1.84 1996/02/10 18:31:13 thorpej Exp $ */
+/* $OpenBSD: fd.c,v 1.12 1996/04/18 17:12:13 niklas Exp $ */
+/* $NetBSD: fd.c,v 1.85 1996/03/04 04:01:03 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum.
@@ -926,7 +927,7 @@ loop:
#endif
}}
#endif
- read = bp->b_flags & B_READ;
+ read = bp->b_flags & B_READ ? DMAMODE_READ : DMAMODE_WRITE;
#ifdef NEWCONFIG
at_dma(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
fdc->sc_drq);
@@ -1018,7 +1019,7 @@ loop:
#ifdef NEWCONFIG
at_dma_terminate(fdc->sc_drq);
#else
- read = bp->b_flags & B_READ;
+ read = bp->b_flags & B_READ ? DMAMODE_READ : DMAMODE_WRITE;
isa_dmadone(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
fdc->sc_drq);
#endif
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index dc21d08587b..98be314a8c0 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,5 @@
-/* $NetBSD: isa_machdep.c,v 1.10 1996/02/09 02:26:00 mycroft Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.10 1996/04/18 17:12:16 niklas Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.11 1996/02/28 01:49:35 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -61,35 +62,6 @@ typedef (*vector)();
extern vector IDTVEC(intr)[], IDTVEC(fast)[];
extern struct gate_descriptor idt[];
-int isamatch __P((struct device *, void *, void *));
-void isaattach __P((struct device *, struct device *, void *));
-
-struct cfdriver isacd = {
- NULL, "isa", isamatch, isaattach, DV_DULL, sizeof(struct isa_softc), 1
-};
-
-int
-isamatch(parent, match, aux)
- struct device *parent;
- void *match, *aux;
-{
-
- return (1);
-}
-
-void
-isaattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
-{
- struct isa_softc *sc = (struct isa_softc *)self;
-
- printf("\n");
-
- TAILQ_INIT(&sc->sc_subdevs);
- config_scan(isascan, self);
-}
-
/*
* Fill in default interrupt table (in case of spuruious interrupt
* during configuration of kernel, setup interrupt control unit
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index aefc27ac224..8ce645e44e8 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: pccons.c,v 1.6 1996/03/29 12:05:39 mickey Exp $ */
-/* $NetBSD: pccons.c,v 1.91 1995/12/24 02:30:25 mycroft Exp $ */
+/* $OpenBSD: pccons.c,v 1.7 1996/04/18 17:12:18 niklas Exp $ */
+/* $NetBSD: pccons.c,v 1.92 1996/03/16 06:08:46 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@@ -478,6 +478,14 @@ pcattach(parent, self, aux)
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_TTY, pcintr,
sc, sc->sc_dev.dv_xname);
+
+ /*
+ * Look for children of the keyboard controller.
+ * XXX Really should decouple keyboard controller
+ * from the console code.
+ */
+ while (config_found(self, NULL, NULL))
+ /* will break when no more children */ ;
}
int
diff --git a/sys/arch/i386/isa/pms.c b/sys/arch/i386/isa/pms.c
index 11e89cd9e61..12bb0e81548 100644
--- a/sys/arch/i386/isa/pms.c
+++ b/sys/arch/i386/isa/pms.c
@@ -1,4 +1,5 @@
-/* $NetBSD: pms.c,v 1.24 1995/12/24 02:30:28 mycroft Exp $ */
+/* $OpenBSD: pms.c,v 1.6 1996/04/18 17:12:20 niklas Exp $ */
+/* $NetBSD: pms.c,v 1.25 1996/03/16 06:08:50 thorpej Exp $ */
/*-
* Copyright (c) 1994 Charles Hannum.
@@ -155,16 +156,31 @@ pms_pit_cmd(value)
outb(PMS_DATA, value);
}
+/*
+ * XXX needs more work yet. We should have a `pckbd_attach_args' that
+ * provides the parent's io port and our irq.
+ */
int
pmsprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
{
- struct isa_attach_args *ia = aux;
+ struct cfdata *cf = match;
u_char x;
- if (ia->ia_iobase != 0x60)
- return 0;
+ /*
+ * We only attach to the keyboard controller via
+ * the console drivers. (We really wish we could be the
+ * child of a real keyboard controller driver.)
+ */
+ if ((parent == NULL) ||
+ ((strcmp(parent->dv_cfdata->cf_driver->cd_name, "pc") != 0) &&
+ (strcmp(parent->dv_cfdata->cf_driver->cd_name, "vt") != 0)))
+ return (0);
+
+ /* Can't wildcard IRQ. */
+ if (cf->cf_loc[0] == -1)
+ return (0);
pms_dev_cmd(PMS_RESET);
pms_aux_cmd(PMS_AUX_TEST);
@@ -174,8 +190,6 @@ pmsprobe(parent, match, aux)
if (x & 0x04)
return 0;
- ia->ia_iosize = PMS_NPORTS;
- ia->ia_msize = 0;
return 1;
}
@@ -185,14 +199,14 @@ pmsattach(parent, self, aux)
void *aux;
{
struct pms_softc *sc = (void *)self;
- struct isa_attach_args *ia = aux;
+ int irq = self->dv_cfdata->cf_loc[0];
- printf("\n");
+ printf(" irq %d\n", irq);
/* Other initialization was done by pmsprobe. */
sc->sc_state = 0;
- sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_TTY, pmsintr,
+ sc->sc_ih = isa_intr_establish(irq, IST_EDGE, IPL_TTY, pmsintr,
sc, sc->sc_dev.dv_xname);
}
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 91ab422a591..45564bd20b9 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,5 @@
-/* $NetBSD: fd.c,v 1.84 1996/02/10 18:31:13 thorpej Exp $ */
+/* $OpenBSD: fd.c,v 1.12 1996/04/18 17:12:13 niklas Exp $ */
+/* $NetBSD: fd.c,v 1.85 1996/03/04 04:01:03 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum.
@@ -926,7 +927,7 @@ loop:
#endif
}}
#endif
- read = bp->b_flags & B_READ;
+ read = bp->b_flags & B_READ ? DMAMODE_READ : DMAMODE_WRITE;
#ifdef NEWCONFIG
at_dma(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
fdc->sc_drq);
@@ -1018,7 +1019,7 @@ loop:
#ifdef NEWCONFIG
at_dma_terminate(fdc->sc_drq);
#else
- read = bp->b_flags & B_READ;
+ read = bp->b_flags & B_READ ? DMAMODE_READ : DMAMODE_WRITE;
isa_dmadone(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
fdc->sc_drq);
#endif