summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/dev/z8530kbd.c14
-rw-r--r--sys/arch/sparc64/dev/comkbd_ebus.c35
-rw-r--r--sys/arch/sparc64/dev/z8530kbd.c14
3 files changed, 49 insertions, 14 deletions
diff --git a/sys/arch/sparc/dev/z8530kbd.c b/sys/arch/sparc/dev/z8530kbd.c
index 82ddc738c63..4131cfb1ed5 100644
--- a/sys/arch/sparc/dev/z8530kbd.c
+++ b/sys/arch/sparc/dev/z8530kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530kbd.c,v 1.1 2002/08/12 10:44:04 miod Exp $ */
+/* $OpenBSD: z8530kbd.c,v 1.2 2002/11/29 01:00:46 miod Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -425,11 +425,23 @@ zskbd_attach(parent, self, aux)
if (ISTYPE5(zst->zst_layout)) {
printf(": keyboard, type 5, layout 0x%x", zst->zst_layout);
a.keymap = &sunkbd5_keymapdata;
+#ifndef SUNKBD5_LAYOUT
+ if (zst->zst_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[zst->zst_layout] != -1)
+ sunkbd5_keymapdata.layout =
+ sunkbd_layouts[zst->zst_layout];
+#endif
} else {
printf(": keyboard, type %d", zst->zst_id);
if (zst->zst_id >= KB_SUN4)
printf(", layout 0x%x", zst->zst_layout);
a.keymap = &sunkbd_keymapdata;
+#ifndef SUNKBD_LAYOUT
+ if (zst->zst_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[zst->zst_layout] != -1)
+ sunkbd_keymapdata.layout =
+ sunkbd_layouts[zst->zst_layout];
+#endif
}
a.accessops = &zskbd_accessops;
a.accesscookie = zst;
diff --git a/sys/arch/sparc64/dev/comkbd_ebus.c b/sys/arch/sparc64/dev/comkbd_ebus.c
index ec8b943a337..c201ef04436 100644
--- a/sys/arch/sparc64/dev/comkbd_ebus.c
+++ b/sys/arch/sparc64/dev/comkbd_ebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comkbd_ebus.c,v 1.7 2002/05/29 20:43:43 maja Exp $ */
+/* $OpenBSD: comkbd_ebus.c,v 1.8 2002/11/29 01:00:49 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -232,7 +232,28 @@ comkbd_attach(parent, self, aux)
0, &sc->sc_ioh) != 0) {
printf(": can't map register space\n");
return;
+ } else
+ printf("\n");
+
+ if (ISTYPE5(sc->sc_layout)) {
+ a.keymap = &sunkbd5_keymapdata;
+#ifndef SUNKBD5_LAYOUT
+ if (sc->sc_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[sc->sc_layout] != -1)
+ sunkbd5_keymapdata.layout =
+ sunkbd_layouts[sc->sc_layout];
+#endif
+ } else {
+ a.keymap = &sunkbd_keymapdata;
+#ifndef SUNKBD_LAYOUT
+ if (sc->sc_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[sc->sc_layout] != -1)
+ sunkbd_keymapdata.layout =
+ sunkbd_layouts[sc->sc_layout];
+#endif
}
+ a.accessops = &comkbd_accessops;
+ a.accesscookie = sc;
if (console) {
comkbd_init(sc);
@@ -248,18 +269,8 @@ comkbd_attach(parent, self, aux)
COM_WRITE(sc, com_ier, sc->sc_ier);
COM_READ(sc, com_iir);
COM_WRITE(sc, com_mcr, MCR_IENABLE | MCR_DTR | MCR_RTS);
- } else
- printf("\n");
-
-
- a.console = console;
- if (ISTYPE5(sc->sc_layout)) {
- a.keymap = &sunkbd5_keymapdata;
- } else {
- a.keymap = &sunkbd_keymapdata;
}
- a.accessops = &comkbd_accessops;
- a.accesscookie = sc;
+
sc->sc_wskbddev = config_found(self, &a, wskbddevprint);
}
diff --git a/sys/arch/sparc64/dev/z8530kbd.c b/sys/arch/sparc64/dev/z8530kbd.c
index 4a12fbc0c97..2b2a67d8255 100644
--- a/sys/arch/sparc64/dev/z8530kbd.c
+++ b/sys/arch/sparc64/dev/z8530kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530kbd.c,v 1.12 2002/05/29 20:43:43 maja Exp $ */
+/* $OpenBSD: z8530kbd.c,v 1.13 2002/11/29 01:00:49 miod Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -407,8 +407,20 @@ zskbd_attach(parent, self, aux)
a.console = console;
if (ISTYPE5(zst->zst_layout)) {
a.keymap = &sunkbd5_keymapdata;
+#ifndef SUNKBD5_LAYOUT
+ if (zst->zst_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[zst->zst_layout] != -1)
+ sunkbd5_keymapdata.layout =
+ sunkbd_layouts[zst->zst_layout];
+#endif
} else {
a.keymap = &sunkbd_keymapdata;
+#ifndef SUNKBD_LAYOUT
+ if (zst->zst_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[zst->zst_layout] != -1)
+ sunkbd_keymapdata.layout =
+ sunkbd_layouts[zst->zst_layout];
+#endif
}
a.accessops = &zskbd_accessops;
a.accesscookie = zst;