Lines Matching refs:iop_num

326 int iop_listen(uint iop_num, uint chan,  in iop_listen()  argument
330 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; in iop_listen()
332 if (iop_listeners[iop_num][chan].handler && handler) return -EINVAL; in iop_listen()
333 iop_listeners[iop_num][chan].devname = devname; in iop_listen()
334 iop_listeners[iop_num][chan].handler = handler; in iop_listen()
346 int iop_num = msg->iop_num; in iop_complete_message() local
351 msg->iop_num, msg->channel, IOP_MSG_LEN, msg->reply); in iop_complete_message()
356 iop_writeb(iop_base[iop_num], offset, msg->reply[i]); in iop_complete_message()
359 iop_writeb(iop_base[iop_num], in iop_complete_message()
361 iop_interrupt(iop_base[msg->iop_num]); in iop_complete_message()
372 volatile struct mac_iop *iop = iop_base[msg->iop_num]; in iop_do_send()
376 msg->iop_num, msg->channel, IOP_MSG_LEN, msg->message); in iop_do_send()
394 static void iop_handle_send(uint iop_num, uint chan) in iop_handle_send() argument
396 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_handle_send()
402 if (!(msg = iop_send_queue[iop_num][chan])) return; in iop_handle_send()
410 iop_num, chan, IOP_MSG_LEN, msg->reply); in iop_handle_send()
415 iop_send_queue[iop_num][chan] = msg; in iop_handle_send()
425 static void iop_handle_recv(uint iop_num, uint chan) in iop_handle_recv() argument
427 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_handle_recv()
432 msg->iop_num = iop_num; in iop_handle_recv()
435 msg->handler = iop_listeners[iop_num][chan].handler; in iop_handle_recv()
443 iop_num, chan, IOP_MSG_LEN, msg->message); in iop_handle_recv()
466 int iop_send_message(uint iop_num, uint chan, void *privdata, in iop_send_message() argument
472 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; in iop_send_message()
481 msg->iop_num = iop_num; in iop_send_message()
487 if (!(q = iop_send_queue[iop_num][chan])) { in iop_send_message()
488 iop_send_queue[iop_num][chan] = msg; in iop_send_message()
502 void iop_upload_code(uint iop_num, __u8 *code_start, in iop_upload_code() argument
505 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; in iop_upload_code()
507 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_upload_code()
510 iop_base[iop_num]->ram_data = *code_start++; in iop_upload_code()
518 void iop_download_code(uint iop_num, __u8 *code_start, in iop_download_code() argument
521 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; in iop_download_code()
523 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_download_code()
526 *code_start++ = iop_base[iop_num]->ram_data; in iop_download_code()
536 __u8 *iop_compare_code(uint iop_num, __u8 *code_start, in iop_compare_code() argument
539 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return code_start; in iop_compare_code()
541 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_compare_code()
544 if (*code_start != iop_base[iop_num]->ram_data) { in iop_compare_code()
558 uint iop_num = (uint) dev_id; in iop_ism_irq() local
559 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_ism_irq()
564 iop_pr_debug("iop_num %d status %02X\n", iop_num, in iop_ism_irq()
573 iop_handle_send(iop_num, i); in iop_ism_irq()
586 iop_handle_recv(iop_num, i); in iop_ism_irq()
599 void iop_ism_irq_poll(uint iop_num) in iop_ism_irq_poll() argument
604 iop_ism_irq(0, (void *)iop_num); in iop_ism_irq_poll()