Lines Matching +full:0 +full:x24

31 #define j44(a,b)		(((a>>4)&0x0f)+(b&0xf0))
32 #define j53(a,b) (((a>>3)&0x1f)+((b<<4)&0xe0))
36 module_param(epatc8, int, 0);
40 /* cont = 0 IDE register file
45 static int cont_map[3] = { 0x18, 0x10, 0 };
55 case 0: in epat_write_regr()
57 case 2: w0(0x60+r); w2(1); w0(val); w2(4); in epat_write_regr()
62 case 5: w3(0x40+r); w4(val); in epat_write_regr()
76 case 0: w0(r); w2(1); w2(3); in epat_read_regr()
80 case 1: w0(0x40+r); w2(1); w2(4); in epat_read_regr()
81 a = r1(); b = r2(); w0(0xff); in epat_read_regr()
84 case 2: w0(0x20+r); w2(1); w2(0x25); in epat_read_regr()
90 case 5: w3(r); w2(0x24); a = r4(); w2(4); in epat_read_regr()
103 case 0: w0(7); w2(1); w2(3); w0(0xff); in epat_read_block()
104 ph = 0; in epat_read_block()
105 for(k=0;k<count;k++) { in epat_read_block()
106 if (k == count-1) w0(0xfd); in epat_read_block()
113 w0(0); w2(4); in epat_read_block()
116 case 1: w0(0x47); w2(1); w2(5); w0(0xff); in epat_read_block()
117 ph = 0; in epat_read_block()
118 for(k=0;k<count;k++) { in epat_read_block()
119 if (k == count-1) w0(0xfd); in epat_read_block()
125 w0(0); w2(4); in epat_read_block()
128 case 2: w0(0x27); w2(1); w2(0x25); w0(0); in epat_read_block()
129 ph = 0; in epat_read_block()
130 for(k=0;k<count-1;k++) { in epat_read_block()
131 w2(0x24+ph); in epat_read_block()
135 w2(0x26); w2(0x27); buf[count-1] = r0(); in epat_read_block()
136 w2(0x25); w2(4); in epat_read_block()
139 case 3: w3(0x80); w2(0x24); in epat_read_block()
140 for(k=0;k<count-1;k++) buf[k] = r4(); in epat_read_block()
141 w2(4); w3(0xa0); w2(0x24); buf[count-1] = r4(); in epat_read_block()
145 case 4: w3(0x80); w2(0x24); in epat_read_block()
146 for(k=0;k<(count/2)-1;k++) ((u16 *)buf)[k] = r4w(); in epat_read_block()
148 w2(4); w3(0xa0); w2(0x24); buf[count-1] = r4(); in epat_read_block()
152 case 5: w3(0x80); w2(0x24); in epat_read_block()
153 for(k=0;k<(count/4)-1;k++) ((u32 *)buf)[k] = r4l(); in epat_read_block()
155 w2(4); w3(0xa0); w2(0x24); buf[count-1] = r4(); in epat_read_block()
168 case 0: in epat_write_block()
170 case 2: w0(0x67); w2(1); w2(5); in epat_write_block()
171 ph = 0; in epat_write_block()
172 for(k=0;k<count;k++) { in epat_write_block()
180 case 3: w3(0xc0); in epat_write_block()
181 for(k=0;k<count;k++) w4(buf[k]); in epat_write_block()
185 case 4: w3(0xc0); in epat_write_block()
186 for(k=0;k<(count/2);k++) w4w(((u16 *)buf)[k]); in epat_write_block()
190 case 5: w3(0xc0); in epat_write_block()
191 for(k=0;k<(count/4);k++) w4l(((u32 *)buf)[k]); in epat_write_block()
205 #define WRi(r,v) epat_write_regr(pi,0,r,v)
206 #define RRi(r) (epat_read_regr(pi,0,r))
210 #define CPP(x) w2(4);w0(0x22);w0(0xaa);w0(0x55);w0(0);w0(0xff);\
211 w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff);
219 CPP(0); in epat_connect()
222 CPP(0x40);CPP(0xe0); in epat_connect()
223 w0(0);w2(1);w2(4); in epat_connect()
224 WR(0x8,0x12);WR(0xc,0x14);WR(0x12,0x10); in epat_connect()
225 WR(0xe,0xf);WR(0xf,4); in epat_connect()
226 /* WR(0xe,0xa);WR(0xf,4); */ in epat_connect()
227 WR(0xe,0xd);WR(0xf,0); in epat_connect()
228 /* CPP(0x30); */ in epat_connect()
232 CPP(0xe0); in epat_connect()
233 w0(0);w2(1);w2(4); /* Idle into SPP */ in epat_connect()
235 w0(0);w2(1);w2(4);w2(0xc); in epat_connect()
237 w0(0x40);w2(6);w2(7);w2(4);w2(0xc);w2(4); in epat_connect()
241 WR(8,0x10); WR(0xc,0x14); WR(0xa,0x38); WR(0x12,0x10); in epat_connect()
246 { CPP(0x30); in epat_disconnect()
254 int e[2] = {0,0}; in epat_test_proto()
257 cc = RR(0xd); in epat_test_proto()
261 for (j=0;j<2;j++) { in epat_test_proto()
262 WRi(6,0xa0+j*0x10); in epat_test_proto()
263 for (k=0;k<256;k++) { in epat_test_proto()
264 WRi(2,k^0xaa); in epat_test_proto()
265 WRi(3,k^0x55); in epat_test_proto()
266 if (RRi(2) != (k^0xaa)) e[j]++; in epat_test_proto()
271 f = 0; in epat_test_proto()
273 WR(0x13,1); WR(0x13,0); WR(0xa,0x11); in epat_test_proto()
276 for (k=0;k<256;k++) { in epat_test_proto()
277 if ((scratch[2*k] & 0xff) != k) f++; in epat_test_proto()
278 if ((scratch[2*k+1] & 0xff) != (0xff-k)) f++; in epat_test_proto()
283 printk("%s: epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", in epat_test_proto()
284 pi->device,pi->port,pi->mode,cc,e[0],e[1],f); in epat_test_proto()
287 return (e[0] && e[1]) || f; in epat_test_proto()
297 WR(0xa,0x38); /* read the version code */ in epat_log_adapter()
298 ver = RR(0xb); in epat_log_adapter()
301 printk("%s: epat %s, Shuttle EPAT chip %x at 0x%x, ", in epat_log_adapter()