diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-16 20:03:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-16 20:03:23 +0000 |
commit | f4c3215d929c4f4e37ecb0c1bc54f824318df42a (patch) | |
tree | afc8cd62bc512c8de5f73dd13808ce7a713558aa /sys/arch | |
parent | 68330ed749561ba61b9cb79efdedd3137e66aaa3 (diff) |
Add a new parameter to pckbc_cnattach(): flags to put in the pckbc bowels.
For now, only one such flag is defined, PCKBC_CANT_TRANSLATE. It hints
pckbc that the device does not behave correctly to the ``set translation''
commands.
Set this flag if we are running on a Tadpole Ultrabook machine, which needs it.
This makes the built-in keyboard work correctly on this laptop (with the
help of the software translation pckbd diff).
tested & ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/alpha/api_up1000.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_1000a.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_2100_a50.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_550.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_6600.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_axppci_33.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_eb164.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_eb64plus.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_kn20aa.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/dec_kn300.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/wscons_machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/i386/wscons_machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pckbc_ebus.c | 21 |
13 files changed, 44 insertions, 27 deletions
diff --git a/sys/arch/alpha/alpha/api_up1000.c b/sys/arch/alpha/alpha/api_up1000.c index 244fe78d0c3..c58d0049b2c 100644 --- a/sys/arch/alpha/alpha/api_up1000.c +++ b/sys/arch/alpha/alpha/api_up1000.c @@ -1,4 +1,4 @@ -/* $OpenBSD: api_up1000.c,v 1.8 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: api_up1000.c,v 1.9 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: api_up1000.c,v 1.4 2000/06/20 03:48:53 matt Exp $ */ /* @@ -131,7 +131,7 @@ api_up1000_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&icp->ic_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_1000a.c b/sys/arch/alpha/alpha/dec_1000a.c index 36261982e54..3bc81d1dca2 100644 --- a/sys/arch/alpha/alpha/dec_1000a.c +++ b/sys/arch/alpha/alpha/dec_1000a.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_1000a.c,v 1.5 2008/06/26 05:42:08 ray Exp $ */ +/* $OpenBSD: dec_1000a.c,v 1.6 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_1000a.c,v 1.14 2001/06/05 04:53:11 thorpej Exp $ */ /* @@ -201,7 +201,7 @@ dec_1000a_cons_init() #if NPCKBD > 0 /* display console ... */ /* XXX */ - (void) pckbc_cnattach(iot, IO_KBD, KBCMDP, PCKBC_KBD_SLOT); + (void) pckbc_cnattach(iot, IO_KBD, KBCMDP, PCKBC_KBD_SLOT, 0); /* * AlphaServer 1000s have a firmware bug whereby the diff --git a/sys/arch/alpha/alpha/dec_2100_a50.c b/sys/arch/alpha/alpha/dec_2100_a50.c index 52ded48e041..c16c17c4eb8 100644 --- a/sys/arch/alpha/alpha/dec_2100_a50.c +++ b/sys/arch/alpha/alpha/dec_2100_a50.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_2100_a50.c,v 1.18 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_2100_a50.c,v 1.19 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_2100_a50.c,v 1.43 2000/05/22 20:13:31 thorpej Exp $ */ /* @@ -140,7 +140,7 @@ dec_2100_a50_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&acp->ac_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_550.c b/sys/arch/alpha/alpha/dec_550.c index 6a8ef78cbe2..b4ba2ba45b0 100644 --- a/sys/arch/alpha/alpha/dec_550.c +++ b/sys/arch/alpha/alpha/dec_550.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_550.c,v 1.10 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_550.c,v 1.11 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_550.c,v 1.10 2000/06/20 03:48:53 matt Exp $ */ /* @@ -132,7 +132,7 @@ dec_550_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_6600.c b/sys/arch/alpha/alpha/dec_6600.c index 20c1e9d3431..458e0dc19ef 100644 --- a/sys/arch/alpha/alpha/dec_6600.c +++ b/sys/arch/alpha/alpha/dec_6600.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_6600.c,v 1.9 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_6600.c,v 1.10 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_6600.c,v 1.7 2000/06/20 03:48:54 matt Exp $ */ /* @@ -128,7 +128,7 @@ dec_6600_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&tsp->pc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctbslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_axppci_33.c b/sys/arch/alpha/alpha/dec_axppci_33.c index 42662b098ef..a696883b951 100644 --- a/sys/arch/alpha/alpha/dec_axppci_33.c +++ b/sys/arch/alpha/alpha/dec_axppci_33.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_axppci_33.c,v 1.19 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_axppci_33.c,v 1.20 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_axppci_33.c,v 1.44 2000/05/22 20:13:32 thorpej Exp $ */ /* @@ -174,7 +174,7 @@ dec_axppci_33_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&lcp->lc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_eb164.c b/sys/arch/alpha/alpha/dec_eb164.c index 61150dd9f0f..aa02493655a 100644 --- a/sys/arch/alpha/alpha/dec_eb164.c +++ b/sys/arch/alpha/alpha/dec_eb164.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_eb164.c,v 1.14 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_eb164.c,v 1.15 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_eb164.c,v 1.33 2000/05/22 20:13:32 thorpej Exp $ */ /* @@ -126,7 +126,7 @@ dec_eb164_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); /* * On at least LX164, SRM reports an isa video board diff --git a/sys/arch/alpha/alpha/dec_eb64plus.c b/sys/arch/alpha/alpha/dec_eb64plus.c index dca2457aa73..230b538a604 100644 --- a/sys/arch/alpha/alpha/dec_eb64plus.c +++ b/sys/arch/alpha/alpha/dec_eb64plus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_eb64plus.c,v 1.6 2007/03/21 22:10:57 martin Exp $ */ +/* $OpenBSD: dec_eb64plus.c,v 1.7 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_eb64plus.c,v 1.25 2001/06/05 04:53:11 thorpej Exp $ */ /* @@ -131,7 +131,7 @@ dec_eb64plus_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&acp->ac_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_kn20aa.c b/sys/arch/alpha/alpha/dec_kn20aa.c index 9735679d88f..be0f750d421 100644 --- a/sys/arch/alpha/alpha/dec_kn20aa.c +++ b/sys/arch/alpha/alpha/dec_kn20aa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_kn20aa.c,v 1.17 2006/11/28 16:56:50 dlg Exp $ */ +/* $OpenBSD: dec_kn20aa.c,v 1.18 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_kn20aa.c,v 1.42 2000/05/22 20:13:32 thorpej Exp $ */ /* @@ -131,7 +131,7 @@ dec_kn20aa_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/alpha/alpha/dec_kn300.c b/sys/arch/alpha/alpha/dec_kn300.c index 503aeb8585c..93cd8e98c44 100644 --- a/sys/arch/alpha/alpha/dec_kn300.c +++ b/sys/arch/alpha/alpha/dec_kn300.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_kn300.c,v 1.2 2007/03/21 22:10:57 martin Exp $ */ +/* $OpenBSD: dec_kn300.c,v 1.3 2008/07/16 20:03:20 miod Exp $ */ /* $NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $ */ /* @@ -181,7 +181,7 @@ dec_kn300_cons_init() /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, KBCMDP, - PCKBC_KBD_SLOT); + PCKBC_KBD_SLOT, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) diff --git a/sys/arch/amd64/amd64/wscons_machdep.c b/sys/arch/amd64/amd64/wscons_machdep.c index b0fb5e2a591..a5fb88593bc 100644 --- a/sys/arch/amd64/amd64/wscons_machdep.c +++ b/sys/arch/amd64/amd64/wscons_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_machdep.c,v 1.6 2008/01/23 16:37:56 jsing Exp $ */ +/* $OpenBSD: wscons_machdep.c,v 1.7 2008/07/16 20:03:22 miod Exp $ */ /* * Copyright (c) 2001 Aaron Campbell @@ -123,7 +123,8 @@ wscninit(struct consdev *cp) if (0) goto dokbd; /* XXX stupid gcc */ dokbd: #if (NPCKBC > 0) - if (!pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT)) + if (!pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT, + 0)) return; #endif #if (NUKBD > 0) diff --git a/sys/arch/i386/i386/wscons_machdep.c b/sys/arch/i386/i386/wscons_machdep.c index 584d76fcc0a..79f1c6aef55 100644 --- a/sys/arch/i386/i386/wscons_machdep.c +++ b/sys/arch/i386/i386/wscons_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_machdep.c,v 1.14 2008/01/23 16:37:56 jsing Exp $ */ +/* $OpenBSD: wscons_machdep.c,v 1.15 2008/07/16 20:03:22 miod Exp $ */ /* * Copyright (c) 2001 Aaron Campbell @@ -123,7 +123,8 @@ wscninit(struct consdev *cp) if (0) goto dokbd; /* XXX stupid gcc */ dokbd: #if (NPCKBC > 0) - if (!pckbc_cnattach(I386_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT)) + if (!pckbc_cnattach(I386_BUS_SPACE_IO, IO_KBD, KBCMDP, PCKBC_KBD_SLOT, + 0)) return; #endif #if (NUKBD > 0) diff --git a/sys/arch/sparc64/dev/pckbc_ebus.c b/sys/arch/sparc64/dev/pckbc_ebus.c index f2e432987bd..d88d3b1188e 100644 --- a/sys/arch/sparc64/dev/pckbc_ebus.c +++ b/sys/arch/sparc64/dev/pckbc_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_ebus.c,v 1.8 2007/10/01 16:11:19 krw Exp $ */ +/* $OpenBSD: pckbc_ebus.c,v 1.9 2008/07/16 20:03:22 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -96,6 +96,7 @@ pckbc_ebus_attach(parent, self, aux) struct ebus_attach_args *ea = aux; struct pckbc_internal *t = NULL; int console; + int flags = 0; sc->sc_node = ea->ea_node; console = pckbc_ebus_is_console(sc); @@ -117,10 +118,23 @@ pckbc_ebus_attach(parent, self, aux) return; } + /* + * The 8042 controller found on the Tadpole SPARCLE doesn't + * implement XT scan code translation. + * XXX I have not checked the value of the model property on + * XXX UltraAXe boards... + */ + { + char model[128]; + OF_getprop(ea->ea_node, "model", &model, sizeof model); + if (strcmp(model, "INTC,80c42") == 0) + flags = PCKBC_CANT_TRANSLATE; + } + if (console) { if (pckbc_cnattach(sc->sc_iot, EBUS_PADDR_FROM_REG(&ea->ea_regs[0]), KBCMDP, - PCKBC_KBD_SLOT) == 0) { + PCKBC_KBD_SLOT, flags) == 0) { t = &pckbc_consdata; pckbc_console_attached = 1; sc->sc_ioh_c = t->t_ioh_c; @@ -142,6 +156,7 @@ pckbc_ebus_attach(parent, self, aux) } t = malloc(sizeof(*t), M_DEVBUF, M_NOWAIT | M_ZERO); + t->t_flags = flags; } psc->intr_establish = pckbc_ebus_intr_establish; @@ -165,11 +180,11 @@ pckbc_ebus_attach(parent, self, aux) t->t_ioh_d = sc->sc_ioh_d; t->t_cmdbyte = KC8_CPU; t->t_sc = psc; + psc->id = t; printf("\n"); pckbc_attach(psc); - } int |