summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa
diff options
context:
space:
mode:
authortobias <tobias@openbsd.org>2013-04-20 08:01:37 +0000
committertobias <tobias@openbsd.org>2013-04-20 08:01:37 +0000
commit5f0427e8cc528eddf9d592b8694e5ece283313b3 (patch)
tree4df94c40c188ba4248dfe4eaf7fcb169276ee566 /sys/dev/isa
parentRemove unused macro function. (diff)
downloadwireguard-openbsd-5f0427e8cc528eddf9d592b8694e5ece283313b3.tar.xz
wireguard-openbsd-5f0427e8cc528eddf9d592b8694e5ece283313b3.zip
Enable active PS/2 multiplexing if available.
Supported for i386 and amd64 except SMALL_KERNEL. Based on Miod's former work on this subject. ok mpi
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/pckbc_isa.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/isa/pckbc_isa.c b/sys/dev/isa/pckbc_isa.c
index e9323500302..c06ee55ea03 100644
--- a/sys/dev/isa/pckbc_isa.c
+++ b/sys/dev/isa/pckbc_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc_isa.c,v 1.11 2012/02/02 21:40:19 deraadt Exp $ */
+/* $OpenBSD: pckbc_isa.c,v 1.12 2013/04/20 08:01:37 tobias Exp $ */
/* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */
/*
@@ -80,12 +80,12 @@ pckbc_isa_match(struct device *parent, void *match, void *aux)
goto fail;
/* flush KBC */
- (void) pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, 0);
+ (void) pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, NULL);
/* KBC selftest */
if (pckbc_send_cmd(iot, ioh_c, KBC_SELFTEST) == 0)
goto fail2;
- res = pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, 0);
+ res = pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, NULL);
if (res != 0x55) {
printf("kbc selftest: %x\n", res);
goto fail2;
@@ -139,6 +139,9 @@ pckbc_isa_attach(struct device *parent, struct device *self, void *aux)
struct pckbc_internal *t;
bus_space_tag_t iot;
bus_space_handle_t ioh_d, ioh_c;
+#ifdef PCKBC_APM
+ uint slot;
+#endif
isc->sc_ic = ia->ia_ic;
iot = ia->ia_iot;
@@ -147,7 +150,12 @@ pckbc_isa_attach(struct device *parent, struct device *self, void *aux)
* Set up IRQs for "normal" ISA.
*/
isc->sc_irq[PCKBC_KBD_SLOT] = 1;
+#ifdef PCKBC_APM
+ for (slot = PCKBC_AUX_SLOT; slot < PCKBC_NSLOTS; slot++)
+ isc->sc_irq[slot] = 12;
+#else
isc->sc_irq[PCKBC_AUX_SLOT] = 12;
+#endif
sc->intr_establish = pckbc_isa_intr_establish;
@@ -189,7 +197,7 @@ pckbc_isa_intr_establish(struct pckbc_softc *sc, pckbc_slot_t slot)
printf("%s: unable to establish interrupt for %s slot\n",
sc->sc_dv.dv_xname, pckbc_slot_names[slot]);
} else {
- printf("%s: using irq %d for %s slot\n", sc->sc_dv.dv_xname,
+ printf("%s: using irq %d for %s\n", sc->sc_dv.dv_xname,
isc->sc_irq[slot], pckbc_slot_names[slot]);
}
}