Lines Matching refs:ppbus
284 device_t ppbus = device_get_parent(dev); in lp_detach() local
286 ppb_lock(ppbus); in lp_detach()
288 ppb_unlock(ppbus); in lp_detach()
344 device_t ppbus = device_get_parent(sc->sc_dev); in lpstop() local
346 ppb_assert_locked(ppbus); in lpstop()
347 ppb_wctr(ppbus, 0x00); in lpstop()
353 ppb_release_bus(ppbus, sc->sc_dev); in lpstop()
361 device_t ppbus = device_get_parent(dev); in lpinit_locked() local
364 ppb_assert_locked(ppbus); in lpinit_locked()
365 error = ppb_request_bus(ppbus, dev, PPB_DONTWAIT); in lpinit_locked()
370 ppb_set_mode(ppbus, PPB_COMPATIBLE); in lpinit_locked()
373 ppb_release_bus(ppbus, dev); in lpinit_locked()
380 ppb_release_bus(ppbus, dev); in lpinit_locked()
384 ppb_wctr(ppbus, IRQENABLE); in lpinit_locked()
399 device_t ppbus = device_get_parent(dev); in lpioctl() local
415 ppb_lock(ppbus); in lpioctl()
422 ppb_unlock(ppbus); in lpioctl()
426 ppb_lock(ppbus); in lpioctl()
431 ppb_unlock(ppbus); in lpioctl()
439 ppb_unlock(ppbus); in lpioctl()
474 clpoutbyte(u_char byte, int spin, device_t ppbus) in clpoutbyte() argument
477 ppb_wdtr(ppbus, ctxmitl[byte]); in clpoutbyte()
478 while (ppb_rstr(ppbus) & CLPIP_SHAKE) in clpoutbyte()
482 ppb_wdtr(ppbus, ctxmith[byte]); in clpoutbyte()
483 while (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) in clpoutbyte()
491 clpinbyte(int spin, device_t ppbus) in clpinbyte() argument
495 while ((ppb_rstr(ppbus) & CLPIP_SHAKE)) in clpinbyte()
499 cl = ppb_rstr(ppbus); in clpinbyte()
500 ppb_wdtr(ppbus, 0x10); in clpinbyte()
502 while (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) in clpinbyte()
506 c = ppb_rstr(ppbus); in clpinbyte()
507 ppb_wdtr(ppbus, 0x00); in clpinbyte()
524 device_t ppbus = device_get_parent(sc->sc_dev); in lp_intr() local
530 ppb_assert_locked(ppbus); in lp_intr()
533 ppb_wdtr(ppbus, 0x01); in lp_intr()
536 j = clpinbyte(LPMAXSPIN2, ppbus); in lp_intr()
540 j = clpinbyte(LPMAXSPIN2, ppbus); in lp_intr()
550 j = clpinbyte(LPMAXSPIN2, ppbus); in lp_intr()
558 j = clpinbyte(LPMAXSPIN2, ppbus); in lp_intr()
575 ppb_unlock(ppbus); in lp_intr()
582 ppb_lock(ppbus); in lp_intr()
586 while ((ppb_rstr(ppbus) & LPIP_SHAKE)) { in lp_intr()
590 cl = ppb_rstr(ppbus); in lp_intr()
591 ppb_wdtr(ppbus, 8); in lp_intr()
594 while ((ppb_rstr(ppbus) & LPIP_SHAKE)) in lp_intr()
598 c = ppb_rstr(ppbus); in lp_intr()
599 ppb_wdtr(ppbus, 0); in lp_intr()
604 while (!((cl = ppb_rstr(ppbus)) & LPIP_SHAKE)) { in lp_intr()
606 (((cl = ppb_rstr(ppbus)) ^ 0xb8) & 0xf8) == in lp_intr()
627 ppb_unlock(ppbus); in lp_intr()
634 ppb_lock(ppbus); in lp_intr()
640 ppb_wdtr(ppbus, 0); in lp_intr()
651 ppb_wctr(ppbus, 0x00); in lp_intr()
658 lpoutbyte(u_char byte, int spin, device_t ppbus) in lpoutbyte() argument
661 ppb_wdtr(ppbus, txmith[byte]); in lpoutbyte()
662 while (!(ppb_rstr(ppbus) & LPIP_SHAKE)) in lpoutbyte()
665 ppb_wdtr(ppbus, txmitl[byte]); in lpoutbyte()
666 while (ppb_rstr(ppbus) & LPIP_SHAKE) in lpoutbyte()
678 device_t ppbus = device_get_parent(dev); in lpoutput() local
688 ppb_lock(ppbus); in lpoutput()
694 ppb_wctr(ppbus, IRQENABLE); in lpoutput()
697 if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { in lpoutput()
704 ppb_wdtr(ppbus, 0x08); in lpoutput()
705 while ((ppb_rstr(ppbus) & 0x08) == 0) in lpoutput()
718 if (clpoutbyte(count & 0xFF, LPMAXSPIN1, ppbus)) in lpoutput()
720 if (clpoutbyte((count >> 8) & 0xFF, LPMAXSPIN1, ppbus)) in lpoutput()
725 if (clpoutbyte(i, LPMAXSPIN1, ppbus)) in lpoutput()
730 if (clpoutbyte(0x08, LPMAXSPIN1, ppbus)) in lpoutput()
732 if (clpoutbyte(0x00, LPMAXSPIN1, ppbus)) in lpoutput()
742 if (clpoutbyte(*cp++, LPMAXSPIN2, ppbus)) in lpoutput()
748 if (clpoutbyte(chksum, LPMAXSPIN2, ppbus)) in lpoutput()
752 ppb_wdtr(ppbus, 0); in lpoutput()
769 if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { in lpoutput()
773 ppb_unlock(ppbus); in lpoutput()
777 if (ppb_rstr(ppbus) & LPIP_SHAKE) { in lpoutput()
782 if (lpoutbyte(0x08, LPMAXSPIN1, ppbus)) in lpoutput()
784 if (lpoutbyte(0x00, LPMAXSPIN2, ppbus)) in lpoutput()
792 if (lpoutbyte(*cp++, LPMAXSPIN2, ppbus)) in lpoutput()
800 ppb_wdtr(ppbus, txmitl[*cp] ^ 0x17); in lpoutput()
814 if (ppb_rstr(ppbus) & LPIP_SHAKE) { in lpoutput()
819 ppb_unlock(ppbus); in lpoutput()
838 DRIVER_MODULE(plip, ppbus, lp_driver, lp_module_handler, NULL);
839 MODULE_DEPEND(plip, ppbus, 1, 1, 1);