Lines Matching full:pi

12 	1.01	GRG 1998.05.05 init_proto, release_proto, pi->delay 
13 1.02 GRG 1998.08.15 default pi->delay returned to 4
32 #define PC pi->private
48 static int bpck_read_regr( PIA *pi, int cont, int regr ) in bpck_read_regr() argument
54 switch (pi->mode) { in bpck_read_regr()
79 static void bpck_write_regr( PIA *pi, int cont, int regr, int val ) in bpck_write_regr() argument
85 switch (pi->mode) { in bpck_write_regr()
105 #define WR(r,v) bpck_write_regr(pi,2,r,v)
106 #define RR(r) (bpck_read_regr(pi,2,r))
108 static void bpck_write_block( PIA *pi, char * buf, int count ) in bpck_write_block() argument
112 switch (pi->mode) { in bpck_write_block()
149 static void bpck_read_block( PIA *pi, char * buf, int count ) in bpck_read_block() argument
153 switch (pi->mode) { in bpck_read_block()
196 static int bpck_probe_unit ( PIA *pi ) in bpck_probe_unit() argument
201 id = pi->unit; in bpck_probe_unit()
219 static void bpck_connect ( PIA *pi ) in bpck_connect() argument
221 { pi->saved_r0 = r0(); in bpck_connect()
222 w0(0xff-pi->unit); w2(4); w0(pi->unit); in bpck_connect()
226 switch (pi->mode) { in bpck_connect()
243 if (pi->devtype == PI_PCD) { in bpck_connect()
253 static void bpck_disconnect ( PIA *pi ) in bpck_disconnect() argument
256 if (pi->mode >= 2) { w2(9); w2(0); } else t2(2); in bpck_disconnect()
257 w2(0x4c); w0(pi->saved_r0); in bpck_disconnect()
260 static void bpck_force_spp ( PIA *pi ) in bpck_force_spp() argument
264 { pi->saved_r0 = r0(); in bpck_force_spp()
265 w0(0xff-pi->unit); w2(4); w0(pi->unit); in bpck_force_spp()
273 w2(0x4c); w0(pi->saved_r0); in bpck_force_spp()
278 static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) in bpck_test_proto() argument
283 bpck_force_spp(pi); in bpck_test_proto()
285 switch (pi->mode) { in bpck_test_proto()
287 case 0: bpck_connect(pi); in bpck_test_proto()
295 bpck_disconnect(pi); in bpck_test_proto()
298 case 1: bpck_connect(pi); in bpck_test_proto()
303 bpck_disconnect(pi); in bpck_test_proto()
308 case 4: om = pi->mode; in bpck_test_proto()
309 pi->mode = 0; in bpck_test_proto()
310 bpck_connect(pi); in bpck_test_proto()
313 bpck_disconnect(pi); in bpck_test_proto()
315 pi->mode = om; in bpck_test_proto()
316 bpck_connect(pi); in bpck_test_proto()
319 switch (pi->mode) { in bpck_test_proto()
330 bpck_disconnect(pi); in bpck_test_proto()
338 pi->device,pi->port,pi->unit,pi->mode); in bpck_test_proto()
348 static void bpck_read_eeprom ( PIA *pi, char * buf ) in bpck_read_eeprom() argument
352 bpck_force_spp(pi); in bpck_read_eeprom()
354 om = pi->mode; od = pi->delay; in bpck_read_eeprom()
355 pi->mode = 0; pi->delay = 6; in bpck_read_eeprom()
357 bpck_connect(pi); in bpck_read_eeprom()
387 bpck_disconnect(pi); in bpck_read_eeprom()
390 bpck_connect(pi); in bpck_read_eeprom()
393 bpck_disconnect(pi); in bpck_read_eeprom()
396 pi->mode = om; pi->delay = od; in bpck_read_eeprom()
399 static int bpck_test_port ( PIA *pi ) /* check for 8-bit port */ in bpck_test_port() argument
418 static void bpck_log_adapter( PIA *pi, char * scratch, int verbose ) in bpck_log_adapter() argument
427 bpck_read_eeprom(pi,scratch); in bpck_log_adapter()
434 printk("%s: bpck EEPROM: %64.64s\n",pi->device,scratch); in bpck_log_adapter()
435 printk("%s: %64.64s\n",pi->device,&scratch[64]); in bpck_log_adapter()
440 pi->device,BPCK_VERSION,&scratch[110],pi->unit); in bpck_log_adapter()
441 printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, in bpck_log_adapter()
442 pi->mode,mode_string[pi->mode],pi->delay); in bpck_log_adapter()