15 #define ON20_VERSION "1.01"
17 #include <linux/module.h>
20 #include <linux/kernel.h>
21 #include <linux/types.h>
22 #include <linux/wait.h>
27 #define op(f) w2(4);w0(f);w2(5);w2(0xd);w2(5);w2(0xd);w2(5);w2(4);
28 #define vl(v) w2(4);w0(v);w2(5);w2(7);w2(5);w2(4);
30 #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0))
36 static int on20_read_regr(
PIA *pi,
int cont,
int regr )
40 r = (regr<<2) + 1 + cont;
46 case 0:
w2(4);
w2(6); l =
r1();
51 case 1:
w2(4);
w2(0x26); r =
r0();
59 static void on20_write_regr(
PIA *pi,
int cont,
int regr,
int val )
63 r = (regr<<2) + 1 + cont;
70 static void on20_connect (
PIA *pi)
80 static void on20_disconnect (
PIA *pi )
87 static void on20_read_block(
PIA *pi,
char *
buf,
int count )
104 static void on20_write_block(
PIA *pi,
char * buf,
int count )
110 for (k=0;k<
count;k++) {
w2(5);
w0(buf[k]);
w2(7); }
116 {
char *mode_string[2] = {
"4-bit",
"8-bit"};
118 printk(
"%s: on20 %s, OnSpec 90c20 at 0x%x, ",
132 .write_regr = on20_write_regr,
133 .read_regr = on20_read_regr,
134 .write_block = on20_write_block,
135 .read_block = on20_read_block,
136 .connect = on20_connect,
137 .disconnect = on20_disconnect,
138 .log_adapter = on20_log_adapter,
141 static int __init on20_init(
void)
146 static void __exit on20_exit(
void)