summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-10 12:37:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-10 12:37:46 +0000
commit7b1a7c43c953d4e48edcb01a494e2fb002ed5feb (patch)
tree90ca8888e1b58c5d19004607adfe07076bfee667
parent66d181c8c69e887c7f81f4bbfc96126c42730d34 (diff)
map delay port
-rw-r--r--sys/dev/isa/isa.c12
-rw-r--r--sys/dev/isa/isavar.h14
2 files changed, 22 insertions, 4 deletions
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c
index c92d09119b9..435f3b45f5a 100644
--- a/sys/dev/isa/isa.c
+++ b/sys/dev/isa/isa.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: isa.c,v 1.8 1996/05/07 07:37:07 deraadt Exp $ */
-/* $NetBSD: isa.c,v 1.81 1996/04/29 20:03:24 christos Exp $ */
+/* $OpenBSD: isa.c,v 1.9 1996/05/10 12:37:45 deraadt Exp $ */
+/* $NetBSD: isa.c,v 1.82 1996/05/05 01:14:07 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@@ -85,6 +85,13 @@ isaattach(parent, self, aux)
sc->sc_bc = iba->iba_bc;
sc->sc_ic = iba->iba_ic;
+ /*
+ * Map port 0x84, which causes a 2.5us delay when read.
+ * We do this now, since several drivers need it.
+ */
+ if (bus_io_map(sc->sc_bc, 0x84, 1, &sc->sc_delayioh))
+ panic("isaattach: can't map `delay port'"); /* XXX */
+
TAILQ_INIT(&sc->sc_subdevs);
config_scan(isascan, self);
}
@@ -132,6 +139,7 @@ isascan(parent, match)
ia.ia_msize = cf->cf_loc[3];
ia.ia_irq = cf->cf_loc[4] == 2 ? 9 : cf->cf_loc[4];
ia.ia_drq = cf->cf_loc[5];
+ ia.ia_delayioh = sc->sc_delayioh;
if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0)
config_attach(parent, dev, &ia, isaprint);
diff --git a/sys/dev/isa/isavar.h b/sys/dev/isa/isavar.h
index e6a500bde88..15433366f20 100644
--- a/sys/dev/isa/isavar.h
+++ b/sys/dev/isa/isavar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: isavar.h,v 1.9 1996/04/27 18:39:07 niklas Exp $ */
-/* $NetBSD: isavar.h,v 1.21 1996/04/11 22:20:50 cgd Exp $ */
+/* $OpenBSD: isavar.h,v 1.10 1996/05/10 12:37:45 deraadt Exp $ */
+/* $NetBSD: isavar.h,v 1.22 1996/05/05 01:14:14 thorpej Exp $ */
/*
* Copyright (c) 1995 Chris G. Demetriou
@@ -88,6 +88,8 @@ struct isa_attach_args {
int ia_maddr; /* physical i/o mem addr */
u_int ia_msize; /* size of i/o memory */
void *ia_aux; /* driver specific */
+
+ bus_io_handle_t ia_delayioh; /* i/o handle for `delay port' */
};
#define IOBASEUNK -1 /* i/o address is unknown */
@@ -114,6 +116,14 @@ struct isa_softc {
bus_chipset_tag_t sc_bc;
isa_chipset_tag_t sc_ic;
+
+ /*
+ * This i/o handle is used to map port 0x84, which is
+ * read to provide a 2.5us delay. This i/o handle
+ * is mapped in isaattach(), and exported to drivers
+ * via isa_attach_args.
+ */
+ bus_io_handle_t sc_delayioh;
};
#define cf_iobase cf_loc[0]