Lines Matching refs:ppb
182 unsigned short ppb = dev->base; in ppa_wait() local
187 for (r = r_str(ppb); ((r & 0xc0) != 0xc0) && (k); k--) { in ppa_wait()
189 r = r_str(ppb); in ppa_wait()
211 static inline void epp_reset(unsigned short ppb) in epp_reset() argument
215 i = r_str(ppb); in epp_reset()
216 w_str(ppb, i); in epp_reset()
217 w_str(ppb, i & 0xfe); in epp_reset()
280 unsigned short ppb = dev->base; in ppa_out() local
292 r = ppa_byte_out(ppb, buffer, len); in ppa_out()
298 epp_reset(ppb); in ppa_out()
299 w_ctr(ppb, 0x4); in ppa_out()
302 outsw(ppb + 4, buffer, len >> 1); in ppa_out()
305 outsl(ppb + 4, buffer, len >> 2); in ppa_out()
308 outsb(ppb + 4, buffer, len); in ppa_out()
309 w_ctr(ppb, 0xc); in ppa_out()
310 r = !(r_str(ppb) & 0x01); in ppa_out()
311 w_ctr(ppb, 0xc); in ppa_out()
325 unsigned short ppb = dev->base; in ppa_in() local
336 r = ppa_nibble_in(ppb, buffer, len); in ppa_in()
337 w_ctr(ppb, 0xc); in ppa_in()
342 w_ctr(ppb, 0x25); in ppa_in()
343 r = ppa_byte_in(ppb, buffer, len); in ppa_in()
344 w_ctr(ppb, 0x4); in ppa_in()
345 w_ctr(ppb, 0xc); in ppa_in()
351 epp_reset(ppb); in ppa_in()
352 w_ctr(ppb, 0x24); in ppa_in()
355 insw(ppb + 4, buffer, len >> 1); in ppa_in()
358 insl(ppb + 4, buffer, len >> 2); in ppa_in()
361 insb(ppb + 4, buffer, len); in ppa_in()
362 w_ctr(ppb, 0x2c); in ppa_in()
363 r = !(r_str(ppb) & 0x01); in ppa_in()
364 w_ctr(ppb, 0x2c); in ppa_in()
377 static inline void ppa_d_pulse(unsigned short ppb, unsigned char b) in ppa_d_pulse() argument
379 w_dtr(ppb, b); in ppa_d_pulse()
380 w_ctr(ppb, 0xc); in ppa_d_pulse()
381 w_ctr(ppb, 0xe); in ppa_d_pulse()
382 w_ctr(ppb, 0xc); in ppa_d_pulse()
383 w_ctr(ppb, 0x4); in ppa_d_pulse()
384 w_ctr(ppb, 0xc); in ppa_d_pulse()
389 unsigned short ppb = dev->base; in ppa_disconnect() local
391 ppa_d_pulse(ppb, 0); in ppa_disconnect()
392 ppa_d_pulse(ppb, 0x3c); in ppa_disconnect()
393 ppa_d_pulse(ppb, 0x20); in ppa_disconnect()
394 ppa_d_pulse(ppb, 0xf); in ppa_disconnect()
397 static inline void ppa_c_pulse(unsigned short ppb, unsigned char b) in ppa_c_pulse() argument
399 w_dtr(ppb, b); in ppa_c_pulse()
400 w_ctr(ppb, 0x4); in ppa_c_pulse()
401 w_ctr(ppb, 0x6); in ppa_c_pulse()
402 w_ctr(ppb, 0x4); in ppa_c_pulse()
403 w_ctr(ppb, 0xc); in ppa_c_pulse()
408 unsigned short ppb = dev->base; in ppa_connect() local
410 ppa_c_pulse(ppb, 0); in ppa_connect()
411 ppa_c_pulse(ppb, 0x3c); in ppa_connect()
412 ppa_c_pulse(ppb, 0x20); in ppa_connect()
414 ppa_c_pulse(ppb, 0xcf); in ppa_connect()
416 ppa_c_pulse(ppb, 0x8f); in ppa_connect()
422 unsigned short ppb = dev->base; in ppa_select() local
432 } while ((r_str(ppb) & 0x40) && (k)); in ppa_select()
436 w_dtr(ppb, (1 << target)); in ppa_select()
437 w_ctr(ppb, 0xe); in ppa_select()
438 w_ctr(ppb, 0xc); in ppa_select()
439 w_dtr(ppb, 0x80); /* This is NOT the initator */ in ppa_select()
440 w_ctr(ppb, 0x8); in ppa_select()
447 while (!(r_str(ppb) & 0x40) && (k)); in ppa_select()
466 unsigned short ppb = dev->base; in ppa_init() local
473 w_ctr(ppb, 0xe); in ppa_init()
474 if ((r_str(ppb) & 0x08) == 0x08) in ppa_init()
477 w_ctr(ppb, 0xc); in ppa_init()
478 if ((r_str(ppb) & 0x08) == 0x00) in ppa_init()
482 ppa_reset_pulse(ppb); in ppa_init()
522 unsigned short ppb = dev->base; in ppa_completion() local
536 r = (r_str(ppb) & 0xf0); in ppa_completion()
566 for (; k && ((r = (r_str(ppb) & 0xf0)) & 0xc0) != 0xc0; in ppa_completion()
600 r = (r_str(ppb) & 0xf0); in ppa_completion()
673 unsigned short ppb = dev->base; in ppa_engine() local
700 w_ctr(ppb, 0xe); in ppa_engine()
701 if ((r_str(ppb) & 0x08) == 0x08) in ppa_engine()
704 w_ctr(ppb, 0xc); in ppa_engine()
705 if ((r_str(ppb) & 0x08) == 0x00) in ppa_engine()
731 w_ctr(ppb, 0x0c); in ppa_engine()
732 if (!(r_str(ppb) & 0x80)) in ppa_engine()
755 w_ctr(ppb, 0x0c); in ppa_engine()
756 if (!(r_str(ppb) & 0x80)) in ppa_engine()
887 int loop, old_mode, status, k, ppb = dev->base; in device_check() local
893 if ((ppb & 0x0007) == 0x0000) in device_check()
908 w_ctr(ppb, 0x0c); in device_check()
915 w_dtr(ppb, 0x40); in device_check()
916 w_ctr(ppb, 0x08); in device_check()
918 w_ctr(ppb, 0x0c); in device_check()
928 w_ctr(ppb, 0x0c); in device_check()
931 l = r_str(ppb); in device_check()
941 ppa_reset_pulse(ppb); in device_check()
955 ppa_reset_pulse(ppb); in device_check()
1023 int modes, ppb, ppb_hi; in __ppa_attach() local
1066 ppb = dev->base = dev->dev->port->base; in __ppa_attach()
1068 w_ctr(ppb, 0x0c); in __ppa_attach()