-/* $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.
#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);
#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
-/* $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.
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
-/* $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.
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
-/* $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.
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);
if (x & 0x04)
return 0;
- ia->ia_iosize = PMS_NPORTS;
- ia->ia_msize = 0;
return 1;
}
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);
}
-/* $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.
#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);
#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