Lines Matching refs:apbs

90 } apbs[MAX_BOARD];  variable
148 if (apbs[boardno - 1].RamIO) { in ac_register_board()
150 boardno, physloc, boardno, apbs[boardno-1].PhysIO); in ac_register_board()
156 apbs[boardno].PhysIO = physloc; in ac_register_board()
157 apbs[boardno].RamIO = loc; in ac_register_board()
158 init_waitqueue_head(&apbs[boardno].FlagSleepSend); in ac_register_board()
159 spin_lock_init(&apbs[boardno].mutex); in ac_register_board()
174 if (!apbs[i].RamIO) in applicom_exit()
177 if (apbs[i].irq) in applicom_exit()
178 free_irq(apbs[i].irq, &dummy); in applicom_exit()
180 iounmap(apbs[i].RamIO); in applicom_exit()
234 apbs[boardno - 1].RamIO = NULL; in applicom_init()
240 writeb(0x40, apbs[boardno - 1].RamIO + RAM_IT_FROM_PC); in applicom_init()
242 apbs[boardno - 1].irq = dev->irq; in applicom_init()
280 apbs[boardno - 1].RamIO = NULL; in applicom_init()
283 apbs[boardno - 1].irq = irq; in applicom_init()
286 apbs[boardno - 1].irq = 0; in applicom_init()
312 if (!apbs[i].RamIO) in applicom_init()
316 boardname[serial] = readb(apbs[i].RamIO + TYPE_CARD + serial); in applicom_init()
323 (int)(readb(apbs[i].RamIO + VERS) >> 4), in applicom_init()
324 (int)(readb(apbs[i].RamIO + VERS) & 0xF)); in applicom_init()
326 serial = (readb(apbs[i].RamIO + SERIAL_NUMBER) << 16) + in applicom_init()
327 (readb(apbs[i].RamIO + SERIAL_NUMBER + 1) << 8) + in applicom_init()
328 (readb(apbs[i].RamIO + SERIAL_NUMBER + 2) ); in applicom_init()
343 if (!apbs[i].RamIO) in applicom_init()
345 if (apbs[i].irq) in applicom_init()
346 free_irq(apbs[i].irq, &dummy); in applicom_init()
347 iounmap(apbs[i].RamIO); in applicom_init()
394 if (!apbs[IndexCard].RamIO) in ac_write()
423 spin_lock_irqsave(&apbs[IndexCard].mutex, flags); in ac_write()
426 if(readb(apbs[IndexCard].RamIO + DATA_FROM_PC_READY) > 2) { in ac_write()
427 Dummy = readb(apbs[IndexCard].RamIO + VERS); in ac_write()
428 spin_unlock_irqrestore(&apbs[IndexCard].mutex, flags); in ac_write()
430 IndexCard,(int)readb(apbs[IndexCard].RamIO + DATA_FROM_PC_READY)); in ac_write()
437 add_wait_queue(&apbs[IndexCard].FlagSleepSend, &wait); in ac_write()
440 while (readb(apbs[IndexCard].RamIO + DATA_FROM_PC_READY) != 0) { in ac_write()
441 Dummy = readb(apbs[IndexCard].RamIO + VERS); in ac_write()
444 spin_unlock_irqrestore(&apbs[IndexCard].mutex, flags); in ac_write()
447 remove_wait_queue(&apbs[IndexCard].FlagSleepSend, in ac_write()
451 spin_lock_irqsave(&apbs[IndexCard].mutex, flags); in ac_write()
457 remove_wait_queue(&apbs[IndexCard].FlagSleepSend, &wait); in ac_write()
459 writeb(1, apbs[IndexCard].RamIO + DATA_FROM_PC_READY); in ac_write()
466 void __iomem *to = apbs[IndexCard].RamIO + RAM_FROM_PC; in ac_write()
473 writeb(0x20, apbs[IndexCard].RamIO + TIC_OWNER_FROM_PC); in ac_write()
474 writeb(0xff, apbs[IndexCard].RamIO + NUMCARD_OWNER_FROM_PC); in ac_write()
475 writeb(TicCard, apbs[IndexCard].RamIO + TIC_DES_FROM_PC); in ac_write()
476 writeb(NumCard, apbs[IndexCard].RamIO + NUMCARD_DES_FROM_PC); in ac_write()
477 writeb(2, apbs[IndexCard].RamIO + DATA_FROM_PC_READY); in ac_write()
478 writeb(1, apbs[IndexCard].RamIO + RAM_IT_FROM_PC); in ac_write()
479 Dummy = readb(apbs[IndexCard].RamIO + VERS); in ac_write()
480 spin_unlock_irqrestore(&apbs[IndexCard].mutex, flags); in ac_write()
487 void __iomem *from = apbs[IndexCard].RamIO + RAM_TO_PC; in do_ac_read()
493 st_loc->tic_owner_to_pc = readb(apbs[IndexCard].RamIO + TIC_OWNER_TO_PC); in do_ac_read()
494 st_loc->numcard_owner_to_pc = readb(apbs[IndexCard].RamIO + NUMCARD_OWNER_TO_PC); in do_ac_read()
503 writeb(1, apbs[IndexCard].RamIO + ACK_FROM_PC_READY); in do_ac_read()
504 writeb(1, apbs[IndexCard].RamIO + TYP_ACK_FROM_PC); in do_ac_read()
505 writeb(IndexCard+1, apbs[IndexCard].RamIO + NUMCARD_ACK_FROM_PC); in do_ac_read()
506 writeb(readb(apbs[IndexCard].RamIO + TIC_OWNER_TO_PC), in do_ac_read()
507 apbs[IndexCard].RamIO + TIC_ACK_FROM_PC); in do_ac_read()
508 writeb(2, apbs[IndexCard].RamIO + ACK_FROM_PC_READY); in do_ac_read()
509 writeb(0, apbs[IndexCard].RamIO + DATA_TO_PC_READY); in do_ac_read()
510 writeb(2, apbs[IndexCard].RamIO + RAM_IT_FROM_PC); in do_ac_read()
511 Dummy = readb(apbs[IndexCard].RamIO + VERS); in do_ac_read()
562 if (!apbs[i].RamIO) in ac_read()
564 spin_lock_irqsave(&apbs[i].mutex, flags); in ac_read()
566 tmp = readb(apbs[i].RamIO + DATA_TO_PC_READY); in ac_read()
575 spin_unlock_irqrestore(&apbs[i].mutex, flags); in ac_read()
588 Dummy = readb(apbs[i].RamIO + VERS); in ac_read()
590 spin_unlock_irqrestore(&apbs[i].mutex, flags); in ac_read()
595 i,(int)readb(apbs[i].RamIO + DATA_TO_PC_READY)); in ac_read()
601 Dummy = readb(apbs[i].RamIO + VERS); in ac_read()
602 spin_unlock_irqrestore(&apbs[i].mutex, flags); in ac_read()
638 if (!apbs[i].RamIO) in ac_interrupt()
641 spin_lock(&apbs[i].mutex); in ac_interrupt()
644 if(readb(apbs[i].RamIO + RAM_IT_TO_PC) == 0) { in ac_interrupt()
645 spin_unlock(&apbs[i].mutex); in ac_interrupt()
651 writeb(0, apbs[i].RamIO + RAM_IT_TO_PC); in ac_interrupt()
653 if (readb(apbs[i].RamIO + DATA_TO_PC_READY) > 2) { in ac_interrupt()
655 i+1,(int)readb(apbs[i].RamIO + DATA_TO_PC_READY)); in ac_interrupt()
659 if((readb(apbs[i].RamIO + DATA_FROM_PC_READY) > 2) && in ac_interrupt()
660 (readb(apbs[i].RamIO + DATA_FROM_PC_READY) != 6)) { in ac_interrupt()
663 i+1,(int)readb(apbs[i].RamIO + DATA_FROM_PC_READY)); in ac_interrupt()
667 if (readb(apbs[i].RamIO + DATA_TO_PC_READY) == 2) { /* mailbox sent by the card ? */ in ac_interrupt()
673 if (readb(apbs[i].RamIO + DATA_FROM_PC_READY) == 0) { /* ram i/o free for write by pc ? */ in ac_interrupt()
674 if (waitqueue_active(&apbs[i].FlagSleepSend)) { /* process sleep during read ? */ in ac_interrupt()
675 wake_up_interruptible(&apbs[i].FlagSleepSend); in ac_interrupt()
678 Dummy = readb(apbs[i].RamIO + VERS); in ac_interrupt()
680 if(readb(apbs[i].RamIO + RAM_IT_TO_PC)) { in ac_interrupt()
682 spin_unlock(&apbs[i].mutex); in ac_interrupt()
685 spin_unlock(&apbs[i].mutex); in ac_interrupt()
724 if (cmd != 6 && !apbs[IndexCard].RamIO) in ac_ioctl()
730 pmem = apbs[IndexCard].RamIO; in ac_ioctl()
737 pmem = apbs[IndexCard].RamIO + CONF_END_TEST; in ac_ioctl()
744 pmem = apbs[IndexCard].RamIO + VERS; in ac_ioctl()
746 pmem = apbs[IndexCard].RamIO + TYPE_CARD; in ac_ioctl()
750 (readb(apbs[IndexCard].RamIO + SERIAL_NUMBER) << 16) + in ac_ioctl()
751 (readb(apbs[IndexCard].RamIO + SERIAL_NUMBER + 1) << 8) + in ac_ioctl()
752 (readb(apbs[IndexCard].RamIO + SERIAL_NUMBER + 2) ); in ac_ioctl()
758 pmem = apbs[IndexCard].RamIO + CONF_END_TEST; in ac_ioctl()
762 apbs[IndexCard].RamIO + DATA_FROM_PC_READY); in ac_ioctl()
764 writeb(1, apbs[IndexCard].RamIO + RAM_IT_FROM_PC); in ac_ioctl()
767 if (apbs[i].RamIO) { in ac_ioctl()
768 byte_reset_it = readb(apbs[i].RamIO + RAM_IT_TO_PC); in ac_ioctl()
773 pmem = apbs[IndexCard].RamIO + TIC_DES_FROM_PC; in ac_ioctl()
777 pmem = apbs[IndexCard].RamIO + TIC_OWNER_TO_PC; in ac_ioctl()
784 writeb(adgl->num_card, apbs[IndexCard].RamIO + NUMCARD_OWNER_TO_PC); in ac_ioctl()
785 writeb(adgl->num_card, apbs[IndexCard].RamIO + NUMCARD_DES_FROM_PC); in ac_ioctl()
786 writeb(adgl->num_card, apbs[IndexCard].RamIO + NUMCARD_ACK_FROM_PC); in ac_ioctl()
787 writeb(4, apbs[IndexCard].RamIO + DATA_FROM_PC_READY); in ac_ioctl()
788 writeb(1, apbs[IndexCard].RamIO + RAM_IT_FROM_PC); in ac_ioctl()
799 if (!apbs[i].RamIO) in ac_ioctl()
803 boardname[serial] = readb(apbs[i].RamIO + TYPE_CARD + serial); in ac_ioctl()
808 (int)(readb(apbs[i].RamIO + VERS) >> 4), in ac_ioctl()
809 (int)(readb(apbs[i].RamIO + VERS) & 0xF), in ac_ioctl()
813 serial = (readb(apbs[i].RamIO + SERIAL_NUMBER) << 16) + in ac_ioctl()
814 (readb(apbs[i].RamIO + SERIAL_NUMBER + 1) << 8) + in ac_ioctl()
815 (readb(apbs[i].RamIO + SERIAL_NUMBER + 2) ); in ac_ioctl()
831 if (apbs[i].RamIO && waitqueue_active(&apbs[i].FlagSleepSend)) in ac_ioctl()
839 Dummy = readb(apbs[IndexCard].RamIO + VERS); in ac_ioctl()