-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
#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
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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)
-/* $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 $ */
/*
/* 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)
-/* $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
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)
-/* $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
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)
-/* $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)
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);
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;
}
t = malloc(sizeof(*t), M_DEVBUF, M_NOWAIT | M_ZERO);
+ t->t_flags = flags;
}
psc->intr_establish = pckbc_ebus_intr_establish;
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
-/* $OpenBSD: pckbc.c,v 1.15 2007/11/26 22:45:27 miod Exp $ */
+/* $OpenBSD: pckbc.c,v 1.16 2008/07/16 20:03:22 miod Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
struct pckbc_internal *t = self;
int ison;
- if (slot != PCKBC_KBD_SLOT) {
+ if (ISSET(t->t_flags, PCKBC_CANT_TRANSLATE) ||
+ slot != PCKBC_KBD_SLOT) {
/* translation only for kbd slot */
if (on)
return (0);
}
int
-pckbc_cnattach(iot, addr, cmd_offset, slot)
+pckbc_cnattach(iot, addr, cmd_offset, slot, flags)
bus_space_tag_t iot;
bus_addr_t addr;
bus_size_t cmd_offset;
pckbc_slot_t slot;
+ int flags;
{
bus_space_handle_t ioh_d, ioh_c;
int res = 0;
pckbc_consdata.t_ioh_d = ioh_d;
pckbc_consdata.t_ioh_c = ioh_c;
pckbc_consdata.t_addr = addr;
+ pckbc_consdata.t_flags = flags;
timeout_set(&pckbc_consdata.t_cleanup, pckbc_cleanup, &pckbc_consdata);
timeout_set(&pckbc_consdata.t_poll, pckbc_poll, &pckbc_consdata);
-/* $OpenBSD: pckbcvar.h,v 1.5 2007/01/31 14:35:51 mickey Exp $ */
+/* $OpenBSD: pckbcvar.h,v 1.6 2008/07/16 20:03:22 miod Exp $ */
/* $NetBSD: pckbcvar.h,v 1.4 2000/06/09 04:58:35 soda Exp $ */
/*
bus_addr_t t_addr;
u_char t_cmdbyte; /* shadow */
+ int t_flags;
+#define PCKBC_CANT_TRANSLATE 0x0001 /* can't translate to XT scancodes */
int t_haveaux; /* controller has an aux port */
+
struct pckbc_slotdata *t_slotdata[PCKBC_NSLOTS];
struct pckbc_softc *t_sc; /* back pointer */
void pckbc_attach(struct pckbc_softc *);
int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t,
- pckbc_slot_t);
+ pckbc_slot_t, int);
int pckbc_is_console(bus_space_tag_t, bus_addr_t);
int pckbcintr(void *);