• Home
  • Raw
  • Download

Lines Matching refs:IndexCard

359 	unsigned int IndexCard;	/* Index board number 0 -> 7     */  in ac_write()  local
388 IndexCard = NumCard - 1; in ac_write()
390 if (IndexCard >= MAX_BOARD) in ac_write()
392 IndexCard = array_index_nospec(IndexCard, MAX_BOARD); in ac_write()
394 if (!apbs[IndexCard].RamIO) in ac_write()
399 IndexCard+1); 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()
484 static int do_ac_read(int IndexCard, char __user *buf, in do_ac_read() argument
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()
702 unsigned char IndexCard; in ac_ioctl() local
718 IndexCard = adgl->num_card-1; in ac_ioctl()
720 if (cmd != 6 && IndexCard >= MAX_BOARD) in ac_ioctl()
722 IndexCard = array_index_nospec(IndexCard, MAX_BOARD); in ac_ioctl()
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()
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()
839 Dummy = readb(apbs[IndexCard].RamIO + VERS); in ac_ioctl()
847 (int)IndexCard + 1); in ac_ioctl()