16 #define FIT2_VERSION "1.0"
18 #include <linux/module.h>
21 #include <linux/kernel.h>
22 #include <linux/types.h>
23 #include <linux/wait.h>
28 #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0))
42 {
if (cont == 1)
return;
46 static int fit2_read_regr(
PIA *pi,
int cont,
int regr )
51 if (regr != 6)
return 0xff;
53 }
else r = regr + 0x10;
64 static void fit2_read_block(
PIA *pi,
char *
buf,
int count )
70 for (k=0;k<count/4;k++) {
75 buf[4*k+0] =
j44(a,b);
76 buf[4*k+1] =
j44(d,c);
81 buf[4*k+2] =
j44(d,c);
82 buf[4*k+3] =
j44(a,b);
90 static void fit2_write_block(
PIA *pi,
char * buf,
int count )
96 for (k=0;k<count/2;k++) {
98 w2(5);
w0(buf[2*k+1]);
103 static void fit2_connect (
PIA *pi )
110 static void fit2_disconnect (
PIA *pi )
118 {
printk(
"%s: fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n",
130 .write_regr = fit2_write_regr,
131 .read_regr = fit2_read_regr,
132 .write_block = fit2_write_block,
133 .read_block = fit2_read_block,
134 .connect = fit2_connect,
135 .disconnect = fit2_disconnect,
136 .log_adapter = fit2_log_adapter,
139 static int __init fit2_init(
void)
144 static void __exit fit2_exit(
void)