summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/isa
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-30 22:41:57 +0000
commit072b56c97e17e8e69ddab5a735b5297387a88a70 (patch)
tree22eaee09956502609c240ddff8a108d8733521f9 /sys/arch/alpha/isa
parentb85b15782739220b5bf2563ccdc7ac9e256a31d2 (diff)
Merge to NetBSD 961020. Retained our kernel APIs where NetBSD has changed.
-Wall -Wstrict-prototypes -Wmissing-prototypes too.
Diffstat (limited to 'sys/arch/alpha/isa')
-rw-r--r--sys/arch/alpha/isa/isa_machdep.h2
-rw-r--r--sys/arch/alpha/isa/isafcns_jensen.c4
-rw-r--r--sys/arch/alpha/isa/mcclock_isa.c2
-rw-r--r--sys/arch/alpha/isa/pckbd.c308
-rw-r--r--sys/arch/alpha/isa/pckbdreg.h2
-rw-r--r--sys/arch/alpha/isa/pms.c21
-rw-r--r--sys/arch/alpha/isa/spkrreg.h2
-rw-r--r--sys/arch/alpha/isa/timerreg.h2
8 files changed, 180 insertions, 163 deletions
diff --git a/sys/arch/alpha/isa/isa_machdep.h b/sys/arch/alpha/isa/isa_machdep.h
index e229a164276..75d6cbe4020 100644
--- a/sys/arch/alpha/isa/isa_machdep.h
+++ b/sys/arch/alpha/isa/isa_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.h,v 1.2 1996/07/29 22:59:44 niklas Exp $ */
+/* $OpenBSD: isa_machdep.h,v 1.3 1996/10/30 22:39:37 niklas Exp $ */
/* $NetBSD: isa_machdep.h,v 1.2 1996/04/12 05:39:02 cgd Exp $ */
/*
diff --git a/sys/arch/alpha/isa/isafcns_jensen.c b/sys/arch/alpha/isa/isafcns_jensen.c
index 285d75a90ac..d702ab51f03 100644
--- a/sys/arch/alpha/isa/isafcns_jensen.c
+++ b/sys/arch/alpha/isa/isafcns_jensen.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: isafcns_jensen.c,v 1.3 1996/07/29 22:59:46 niklas Exp $ */
-/* $NetBSD: isafcns_jensen.c,v 1.2 1996/04/12 01:54:04 cgd Exp $ */
+/* $OpenBSD: isafcns_jensen.c,v 1.4 1996/10/30 22:39:38 niklas Exp $ */
+/* $NetBSD: isafcns_jensen.c,v 1.4 1996/10/13 02:59:54 christos Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
diff --git a/sys/arch/alpha/isa/mcclock_isa.c b/sys/arch/alpha/isa/mcclock_isa.c
index 30ea94aa83c..11667b25338 100644
--- a/sys/arch/alpha/isa/mcclock_isa.c
+++ b/sys/arch/alpha/isa/mcclock_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcclock_isa.c,v 1.2 1996/07/29 22:59:47 niklas Exp $ */
+/* $OpenBSD: mcclock_isa.c,v 1.3 1996/10/30 22:39:39 niklas Exp $ */
/* $NetBSD: mcclock_isa.c,v 1.2 1996/04/17 22:22:46 cgd Exp $ */
/*
diff --git a/sys/arch/alpha/isa/pckbd.c b/sys/arch/alpha/isa/pckbd.c
index c10ab4a0a20..f43a4961137 100644
--- a/sys/arch/alpha/isa/pckbd.c
+++ b/sys/arch/alpha/isa/pckbd.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: pckbd.c,v 1.5 1996/07/29 22:59:49 niklas Exp $ */
-/* $NetBSD: pckbd.c,v 1.7 1996/05/05 01:41:53 thorpej Exp $ */
+/* $OpenBSD: pckbd.c,v 1.6 1996/10/30 22:39:40 niklas Exp $ */
+/* $NetBSD: pckbd.c,v 1.9 1996/10/13 02:59:56 christos Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@@ -64,6 +64,7 @@
#include <machine/wsconsio.h>
#include <alpha/wscons/wsconsvar.h>
+#include <alpha/wscons/kbd.h>
#include "wscons.h"
static volatile u_char ack, nak; /* Don't ask. */
@@ -126,6 +127,15 @@ struct wscons_idev_spec pckbd_wscons_idev = {
void pckbd_bell_stop __P((void *));
+static __inline int kbd_wait_output __P((void));
+static __inline int kbd_wait_input __P((void));
+static __inline void kbd_flush_input __P((void));
+u_char kbc_get8042cmd __P((void));
+int kbc_put8042cmd __P((u_char));
+int kbd_cmd __P((u_char, u_char));
+void do_async_update __P((void *));
+void async_update __P((void));
+
/*
* DANGER WIL ROBINSON -- the values of SCROLL, NUM, CAPS, and ALT are
* important.
@@ -142,12 +152,14 @@ void pckbd_bell_stop __P((void *));
#define NONE 0x0400 /* no function */
#define KBD_DELAY \
- { u_char x = bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); } \
- { u_char x = bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); } \
- { u_char x = bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); } \
- { u_char x = bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); }
-
-static inline int
+ do { \
+ bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); \
+ bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); \
+ bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); \
+ bus_io_read_1(pckbd_bc, pckbd_delay_ioh, 0); \
+ } while(0)
+
+static __inline int
kbd_wait_output()
{
u_int i;
@@ -161,7 +173,7 @@ kbd_wait_output()
return 0;
}
-static inline int
+static __inline int
kbd_wait_input()
{
u_int i;
@@ -175,7 +187,7 @@ kbd_wait_input()
return 0;
}
-static inline void
+static __inline void
kbd_flush_input()
{
u_int i;
@@ -193,7 +205,7 @@ kbd_flush_input()
/*
* Get the current command byte.
*/
-static u_char
+u_char
kbc_get8042cmd()
{
@@ -209,7 +221,7 @@ kbc_get8042cmd()
/*
* Pass command byte to keyboard controller (8042).
*/
-static int
+int
kbc_put8042cmd(val)
u_char val;
{
@@ -416,7 +428,6 @@ int
pckbdintr(arg)
void *arg;
{
- struct pckbd_softc *sc = arg;
u_char data;
static u_char last;
@@ -450,11 +461,10 @@ pckbdintr(arg)
}
void
-do_async_update(poll)
- u_char poll;
+do_async_update(vp)
+ void *vp;
{
- int pos;
- static int old_pos = -1;
+ int poll = *(int *)vp;
async = 0;
@@ -479,16 +489,18 @@ do_async_update(poll)
void
async_update()
{
+ static int nopoll = 0;
+ static int poll = 1;
if (kernel || polling) {
if (async)
- untimeout(do_async_update, NULL);
- do_async_update(1);
+ untimeout(do_async_update, &nopoll);
+ do_async_update(&poll);
} else {
if (async)
return;
async = 1;
- timeout(do_async_update, NULL, 1);
+ timeout(do_async_update, &nopoll, 1);
}
}
@@ -582,134 +594,134 @@ typedef struct {
} Scan_def;
static Scan_def scan_codes[] = {
- NONE, "", "", "", /* 0 unused */
- ASCII, "\033", "\033", "\033", /* 1 ESCape */
- ASCII, "1", "!", "!", /* 2 1 */
- ASCII, "2", "@", "\000", /* 3 2 */
- ASCII, "3", "#", "#", /* 4 3 */
- ASCII, "4", "$", "$", /* 5 4 */
- ASCII, "5", "%", "%", /* 6 5 */
- ASCII, "6", "^", "\036", /* 7 6 */
- ASCII, "7", "&", "&", /* 8 7 */
- ASCII, "8", "*", "\010", /* 9 8 */
- ASCII, "9", "(", "(", /* 10 9 */
- ASCII, "0", ")", ")", /* 11 0 */
- ASCII, "-", "_", "\037", /* 12 - */
- ASCII, "=", "+", "+", /* 13 = */
- ASCII, "\177", "\177", "\010", /* 14 backspace */
- ASCII, "\t", "\177\t", "\t", /* 15 tab */
- ASCII, "q", "Q", "\021", /* 16 q */
- ASCII, "w", "W", "\027", /* 17 w */
- ASCII, "e", "E", "\005", /* 18 e */
- ASCII, "r", "R", "\022", /* 19 r */
- ASCII, "t", "T", "\024", /* 20 t */
- ASCII, "y", "Y", "\031", /* 21 y */
- ASCII, "u", "U", "\025", /* 22 u */
- ASCII, "i", "I", "\011", /* 23 i */
- ASCII, "o", "O", "\017", /* 24 o */
- ASCII, "p", "P", "\020", /* 25 p */
- ASCII, "[", "{", "\033", /* 26 [ */
- ASCII, "]", "}", "\035", /* 27 ] */
- ASCII, "\r", "\r", "\n", /* 28 return */
- CTL, "", "", "", /* 29 control */
- ASCII, "a", "A", "\001", /* 30 a */
- ASCII, "s", "S", "\023", /* 31 s */
- ASCII, "d", "D", "\004", /* 32 d */
- ASCII, "f", "F", "\006", /* 33 f */
- ASCII, "g", "G", "\007", /* 34 g */
- ASCII, "h", "H", "\010", /* 35 h */
- ASCII, "j", "J", "\n", /* 36 j */
- ASCII, "k", "K", "\013", /* 37 k */
- ASCII, "l", "L", "\014", /* 38 l */
- ASCII, ";", ":", ";", /* 39 ; */
- ASCII, "'", "\"", "'", /* 40 ' */
- ASCII, "`", "~", "`", /* 41 ` */
- SHIFT, "", "", "", /* 42 shift */
- ASCII, "\\", "|", "\034", /* 43 \ */
- ASCII, "z", "Z", "\032", /* 44 z */
- ASCII, "x", "X", "\030", /* 45 x */
- ASCII, "c", "C", "\003", /* 46 c */
- ASCII, "v", "V", "\026", /* 47 v */
- ASCII, "b", "B", "\002", /* 48 b */
- ASCII, "n", "N", "\016", /* 49 n */
- ASCII, "m", "M", "\r", /* 50 m */
- ASCII, ",", "<", "<", /* 51 , */
- ASCII, ".", ">", ">", /* 52 . */
- ASCII, "/", "?", "\037", /* 53 / */
- SHIFT, "", "", "", /* 54 shift */
- KP, "*", "*", "*", /* 55 kp * */
- ALT, "", "", "", /* 56 alt */
- ASCII, " ", " ", "\000", /* 57 space */
- CAPS, "", "", "", /* 58 caps */
- FUNC, "\033[M", "\033[Y", "\033[k", /* 59 f1 */
- FUNC, "\033[N", "\033[Z", "\033[l", /* 60 f2 */
- FUNC, "\033[O", "\033[a", "\033[m", /* 61 f3 */
- FUNC, "\033[P", "\033[b", "\033[n", /* 62 f4 */
- FUNC, "\033[Q", "\033[c", "\033[o", /* 63 f5 */
- FUNC, "\033[R", "\033[d", "\033[p", /* 64 f6 */
- FUNC, "\033[S", "\033[e", "\033[q", /* 65 f7 */
- FUNC, "\033[T", "\033[f", "\033[r", /* 66 f8 */
- FUNC, "\033[U", "\033[g", "\033[s", /* 67 f9 */
- FUNC, "\033[V", "\033[h", "\033[t", /* 68 f10 */
- NUM, "", "", "", /* 69 num lock */
- SCROLL, "", "", "", /* 70 scroll lock */
- KP, "7", "\033[H", "7", /* 71 kp 7 */
- KP, "8", "\033[A", "8", /* 72 kp 8 */
- KP, "9", "\033[I", "9", /* 73 kp 9 */
- KP, "-", "-", "-", /* 74 kp - */
- KP, "4", "\033[D", "4", /* 75 kp 4 */
- KP, "5", "\033[E", "5", /* 76 kp 5 */
- KP, "6", "\033[C", "6", /* 77 kp 6 */
- KP, "+", "+", "+", /* 78 kp + */
- KP, "1", "\033[F", "1", /* 79 kp 1 */
- KP, "2", "\033[B", "2", /* 80 kp 2 */
- KP, "3", "\033[G", "3", /* 81 kp 3 */
- KP, "0", "\033[L", "0", /* 82 kp 0 */
- KP, ".", "\177", ".", /* 83 kp . */
- NONE, "", "", "", /* 84 0 */
- NONE, "100", "", "", /* 85 0 */
- NONE, "101", "", "", /* 86 0 */
- FUNC, "\033[W", "\033[i", "\033[u", /* 87 f11 */
- FUNC, "\033[X", "\033[j", "\033[v", /* 88 f12 */
- NONE, "102", "", "", /* 89 0 */
- NONE, "103", "", "", /* 90 0 */
- NONE, "", "", "", /* 91 0 */
- NONE, "", "", "", /* 92 0 */
- NONE, "", "", "", /* 93 0 */
- NONE, "", "", "", /* 94 0 */
- NONE, "", "", "", /* 95 0 */
- NONE, "", "", "", /* 96 0 */
- NONE, "", "", "", /* 97 0 */
- NONE, "", "", "", /* 98 0 */
- NONE, "", "", "", /* 99 0 */
- NONE, "", "", "", /* 100 */
- NONE, "", "", "", /* 101 */
- NONE, "", "", "", /* 102 */
- NONE, "", "", "", /* 103 */
- NONE, "", "", "", /* 104 */
- NONE, "", "", "", /* 105 */
- NONE, "", "", "", /* 106 */
- NONE, "", "", "", /* 107 */
- NONE, "", "", "", /* 108 */
- NONE, "", "", "", /* 109 */
- NONE, "", "", "", /* 110 */
- NONE, "", "", "", /* 111 */
- NONE, "", "", "", /* 112 */
- NONE, "", "", "", /* 113 */
- NONE, "", "", "", /* 114 */
- NONE, "", "", "", /* 115 */
- NONE, "", "", "", /* 116 */
- NONE, "", "", "", /* 117 */
- NONE, "", "", "", /* 118 */
- NONE, "", "", "", /* 119 */
- NONE, "", "", "", /* 120 */
- NONE, "", "", "", /* 121 */
- NONE, "", "", "", /* 122 */
- NONE, "", "", "", /* 123 */
- NONE, "", "", "", /* 124 */
- NONE, "", "", "", /* 125 */
- NONE, "", "", "", /* 126 */
- NONE, "", "", "", /* 127 */
+ { NONE, "", "", "" }, /* 0 unused */
+ { ASCII, "\033", "\033", "\033" }, /* 1 ESCape */
+ { ASCII, "1", "!", "!" }, /* 2 1 */
+ { ASCII, "2", "@", "\000" }, /* 3 2 */
+ { ASCII, "3", "#", "#" }, /* 4 3 */
+ { ASCII, "4", "$", "$" }, /* 5 4 */
+ { ASCII, "5", "%", "%" }, /* 6 5 */
+ { ASCII, "6", "^", "\036" }, /* 7 6 */
+ { ASCII, "7", "&", "&" }, /* 8 7 */
+ { ASCII, "8", "*", "\010" }, /* 9 8 */
+ { ASCII, "9", "(", "(" }, /* 10 9 */
+ { ASCII, "0", ")", ")" }, /* 11 0 */
+ { ASCII, "-", "_", "\037" }, /* 12 - */
+ { ASCII, "=", "+", "+" }, /* 13 = */
+ { ASCII, "\177", "\177", "\010" }, /* 14 backspace */
+ { ASCII, "\t", "\177\t", "\t" }, /* 15 tab */
+ { ASCII, "q", "Q", "\021" }, /* 16 q */
+ { ASCII, "w", "W", "\027" }, /* 17 w */
+ { ASCII, "e", "E", "\005" }, /* 18 e */
+ { ASCII, "r", "R", "\022" }, /* 19 r */
+ { ASCII, "t", "T", "\024" }, /* 20 t */
+ { ASCII, "y", "Y", "\031" }, /* 21 y */
+ { ASCII, "u", "U", "\025" }, /* 22 u */
+ { ASCII, "i", "I", "\011" }, /* 23 i */
+ { ASCII, "o", "O", "\017" }, /* 24 o */
+ { ASCII, "p", "P", "\020" }, /* 25 p */
+ { ASCII, "[", "{", "\033" }, /* 26 [ */
+ { ASCII, "]", "}", "\035" }, /* 27 ] */
+ { ASCII, "\r", "\r", "\n" }, /* 28 return */
+ { CTL, "", "", "" }, /* 29 control */
+ { ASCII, "a", "A", "\001" }, /* 30 a */
+ { ASCII, "s", "S", "\023" }, /* 31 s */
+ { ASCII, "d", "D", "\004" }, /* 32 d */
+ { ASCII, "f", "F", "\006" }, /* 33 f */
+ { ASCII, "g", "G", "\007" }, /* 34 g */
+ { ASCII, "h", "H", "\010" }, /* 35 h */
+ { ASCII, "j", "J", "\n" }, /* 36 j */
+ { ASCII, "k", "K", "\013" }, /* 37 k */
+ { ASCII, "l", "L", "\014" }, /* 38 l */
+ { ASCII, ";", ":", ";" }, /* 39 ; */
+ { ASCII, "'", "\"", "'" }, /* 40 ' */
+ { ASCII, "`", "~", "`" }, /* 41 ` */
+ { SHIFT, "", "", "" }, /* 42 shift */
+ { ASCII, "\\", "|", "\034" }, /* 43 \ */
+ { ASCII, "z", "Z", "\032" }, /* 44 z */
+ { ASCII, "x", "X", "\030" }, /* 45 x */
+ { ASCII, "c", "C", "\003" }, /* 46 c */
+ { ASCII, "v", "V", "\026" }, /* 47 v */
+ { ASCII, "b", "B", "\002" }, /* 48 b */
+ { ASCII, "n", "N", "\016" }, /* 49 n */
+ { ASCII, "m", "M", "\r" }, /* 50 m */
+ { ASCII, ",", "<", "<" }, /* 51 , */
+ { ASCII, ".", ">", ">" }, /* 52 . */
+ { ASCII, "/", "?", "\037" }, /* 53 / */
+ { SHIFT, "", "", "" }, /* 54 shift */
+ { KP, "*", "*", "*" }, /* 55 kp * */
+ { ALT, "", "", "" }, /* 56 alt */
+ { ASCII, " ", " ", "\000" }, /* 57 space */
+ { CAPS, "", "", "" }, /* 58 caps */
+ { FUNC, "\033[M", "\033[Y", "\033[k" }, /* 59 f1 */
+ { FUNC, "\033[N", "\033[Z", "\033[l" }, /* 60 f2 */
+ { FUNC, "\033[O", "\033[a", "\033[m" }, /* 61 f3 */
+ { FUNC, "\033[P", "\033[b", "\033[n" }, /* 62 f4 */
+ { FUNC, "\033[Q", "\033[c", "\033[o" }, /* 63 f5 */
+ { FUNC, "\033[R", "\033[d", "\033[p" }, /* 64 f6 */
+ { FUNC, "\033[S", "\033[e", "\033[q" }, /* 65 f7 */
+ { FUNC, "\033[T", "\033[f", "\033[r" }, /* 66 f8 */
+ { FUNC, "\033[U", "\033[g", "\033[s" }, /* 67 f9 */
+ { FUNC, "\033[V", "\033[h", "\033[t" }, /* 68 f10 */
+ { NUM, "", "", "" }, /* 69 num lock */
+ { SCROLL, "", "", "" }, /* 70 scroll lock */
+ { KP, "7", "\033[H", "7" }, /* 71 kp 7 */
+ { KP, "8", "\033[A", "8" }, /* 72 kp 8 */
+ { KP, "9", "\033[I", "9" }, /* 73 kp 9 */
+ { KP, "-", "-", "-" }, /* 74 kp - */
+ { KP, "4", "\033[D", "4" }, /* 75 kp 4 */
+ { KP, "5", "\033[E", "5" }, /* 76 kp 5 */
+ { KP, "6", "\033[C", "6" }, /* 77 kp 6 */
+ { KP, "+", "+", "+" }, /* 78 kp + */
+ { KP, "1", "\033[F", "1" }, /* 79 kp 1 */
+ { KP, "2", "\033[B", "2" }, /* 80 kp 2 */
+ { KP, "3", "\033[G", "3" }, /* 81 kp 3 */
+ { KP, "0", "\033[L", "0" }, /* 82 kp 0 */
+ { KP, ".", "\177", "." }, /* 83 kp . */
+ { NONE, "", "", "" }, /* 84 0 */
+ { NONE, "100", "", "" }, /* 85 0 */
+ { NONE, "101", "", "" }, /* 86 0 */
+ { FUNC, "\033[W", "\033[i", "\033[u" }, /* 87 f11 */
+ { FUNC, "\033[X", "\033[j", "\033[v" }, /* 88 f12 */
+ { NONE, "102", "", "" }, /* 89 0 */
+ { NONE, "103", "", "" }, /* 90 0 */
+ { NONE, "", "", "" }, /* 91 0 */
+ { NONE, "", "", "" }, /* 92 0 */
+ { NONE, "", "", "" }, /* 93 0 */
+ { NONE, "", "", "" }, /* 94 0 */
+ { NONE, "", "", "" }, /* 95 0 */
+ { NONE, "", "", "" }, /* 96 0 */
+ { NONE, "", "", "" }, /* 97 0 */
+ { NONE, "", "", "" }, /* 98 0 */
+ { NONE, "", "", "" }, /* 99 0 */
+ { NONE, "", "", "" }, /* 100 */
+ { NONE, "", "", "" }, /* 101 */
+ { NONE, "", "", "" }, /* 102 */
+ { NONE, "", "", "" }, /* 103 */
+ { NONE, "", "", "" }, /* 104 */
+ { NONE, "", "", "" }, /* 105 */
+ { NONE, "", "", "" }, /* 106 */
+ { NONE, "", "", "" }, /* 107 */
+ { NONE, "", "", "" }, /* 108 */
+ { NONE, "", "", "" }, /* 109 */
+ { NONE, "", "", "" }, /* 110 */
+ { NONE, "", "", "" }, /* 111 */
+ { NONE, "", "", "" }, /* 112 */
+ { NONE, "", "", "" }, /* 113 */
+ { NONE, "", "", "" }, /* 114 */
+ { NONE, "", "", "" }, /* 115 */
+ { NONE, "", "", "" }, /* 116 */
+ { NONE, "", "", "" }, /* 117 */
+ { NONE, "", "", "" }, /* 118 */
+ { NONE, "", "", "" }, /* 119 */
+ { NONE, "", "", "" }, /* 120 */
+ { NONE, "", "", "" }, /* 121 */
+ { NONE, "", "", "" }, /* 122 */
+ { NONE, "", "", "" }, /* 123 */
+ { NONE, "", "", "" }, /* 124 */
+ { NONE, "", "", "" }, /* 125 */
+ { NONE, "", "", "" }, /* 126 */
+ { NONE, "", "", "" } /* 127 */
};
/*
diff --git a/sys/arch/alpha/isa/pckbdreg.h b/sys/arch/alpha/isa/pckbdreg.h
index 0f5aa607fff..10e63b35074 100644
--- a/sys/arch/alpha/isa/pckbdreg.h
+++ b/sys/arch/alpha/isa/pckbdreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbdreg.h,v 1.2 1996/07/29 22:59:51 niklas Exp $ */
+/* $OpenBSD: pckbdreg.h,v 1.3 1996/10/30 22:39:41 niklas Exp $ */
/* $NetBSD: pckbdreg.h,v 1.1 1995/08/03 00:48:30 cgd Exp $ */
/*
diff --git a/sys/arch/alpha/isa/pms.c b/sys/arch/alpha/isa/pms.c
index 3c13fe88153..7b758f43916 100644
--- a/sys/arch/alpha/isa/pms.c
+++ b/sys/arch/alpha/isa/pms.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: pms.c,v 1.2 1996/07/29 22:59:53 niklas Exp $ */
-/* $NetBSD: pms.c,v 1.1 1996/04/12 01:53:06 cgd Exp $ */
+/* $OpenBSD: pms.c,v 1.3 1996/10/30 22:39:42 niklas Exp $ */
+/* $NetBSD: pms.c,v 1.3 1996/10/13 02:59:58 christos Exp $ */
/*-
* Copyright (c) 1994 Charles Hannum.
@@ -53,6 +53,7 @@
#include <machine/intr.h>
#include <dev/isa/isavar.h>
#include <alpha/wscons/wsconsvar.h>
+#include <alpha/wscons/ms.h>
#define PMS_DATA 0x60 /* offset for data port, read-write */
#define PMS_CNTRL 0x64 /* offset for control port, write-only */
@@ -126,12 +127,17 @@ struct wscons_mdev_spec pms_mdev_spec = {
pms_disable,
};
-static inline void
+static __inline void pms_flush __P((void));
+static __inline void pms_dev_cmd __P((u_char));
+static __inline void pms_aux_cmd __P((u_char));
+static __inline void pms_pit_cmd __P((u_char));
+
+static __inline void
pms_flush()
{
u_char c;
- while (c = bus_io_read_1(pms_bc, pms_status_ioh, 0) & 0x03)
+ while ((c = bus_io_read_1(pms_bc, pms_status_ioh, 0)) & 0x03)
if ((c & PMS_OBUF_FULL) == PMS_OBUF_FULL) {
/* XXX - delay is needed to prevent some keyboards from
wedging when the system boots */
@@ -140,7 +146,7 @@ pms_flush()
}
}
-static inline void
+static __inline void
pms_dev_cmd(value)
u_char value;
{
@@ -151,7 +157,7 @@ pms_dev_cmd(value)
bus_io_write_1(pms_bc, pms_data_ioh, 0, value);
}
-static inline void
+static __inline void
pms_aux_cmd(value)
u_char value;
{
@@ -160,7 +166,7 @@ pms_aux_cmd(value)
bus_io_write_1(pms_bc, pms_cntrl_ioh, 0, value);
}
-static inline void
+static __inline void
pms_pit_cmd(value)
u_char value;
{
@@ -288,7 +294,6 @@ pmsintr(arg)
static u_char buttons;
u_char changed;
static char dx, dy;
- u_char buffer[5];
if ((sc->sc_state & PMS_OPEN) == 0) {
/* Interrupts are not expected. Discard the byte. */
diff --git a/sys/arch/alpha/isa/spkrreg.h b/sys/arch/alpha/isa/spkrreg.h
index 89a89edd0f5..d6fe4e6c877 100644
--- a/sys/arch/alpha/isa/spkrreg.h
+++ b/sys/arch/alpha/isa/spkrreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: spkrreg.h,v 1.2 1996/07/29 22:59:55 niklas Exp $ */
+/* $OpenBSD: spkrreg.h,v 1.3 1996/10/30 22:39:43 niklas Exp $ */
/* $NetBSD: spkrreg.h,v 1.1 1996/04/12 01:54:46 cgd Exp $ */
/*
diff --git a/sys/arch/alpha/isa/timerreg.h b/sys/arch/alpha/isa/timerreg.h
index 98dfaa75ceb..7314fb10dde 100644
--- a/sys/arch/alpha/isa/timerreg.h
+++ b/sys/arch/alpha/isa/timerreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timerreg.h,v 1.2 1996/07/29 22:59:57 niklas Exp $ */
+/* $OpenBSD: timerreg.h,v 1.3 1996/10/30 22:39:44 niklas Exp $ */
/* $NetBSD: timerreg.h,v 1.1 1996/04/12 01:54:56 cgd Exp $ */
/*-