Lines Matching refs:iop_num

333 int iop_listen(uint iop_num, uint chan,  in iop_listen()  argument
337 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; in iop_listen()
339 if (iop_listeners[iop_num][chan].handler && handler) return -EINVAL; in iop_listen()
340 iop_listeners[iop_num][chan].devname = devname; in iop_listen()
341 iop_listeners[iop_num][chan].handler = handler; in iop_listen()
353 int iop_num = msg->iop_num; in iop_complete_message() local
357 iop_pr_debug("msg %p iop_num %d channel %d\n", msg, msg->iop_num, in iop_complete_message()
363 iop_writeb(iop_base[iop_num], offset, msg->reply[i]); in iop_complete_message()
366 iop_writeb(iop_base[iop_num], in iop_complete_message()
368 iop_interrupt(iop_base[msg->iop_num]); in iop_complete_message()
379 volatile struct mac_iop *iop = iop_base[msg->iop_num]; in iop_do_send()
398 static void iop_handle_send(uint iop_num, uint chan) in iop_handle_send() argument
400 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_handle_send()
404 iop_pr_debug("iop_num %d chan %d\n", iop_num, chan); in iop_handle_send()
408 if (!(msg = iop_send_queue[iop_num][chan])) return; in iop_handle_send()
418 iop_send_queue[iop_num][chan] = msg; in iop_handle_send()
427 static void iop_handle_recv(uint iop_num, uint chan) in iop_handle_recv() argument
429 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_handle_recv()
433 iop_pr_debug("iop_num %d chan %d\n", iop_num, chan); in iop_handle_recv()
436 msg->iop_num = iop_num; in iop_handle_recv()
439 msg->handler = iop_listeners[iop_num][chan].handler; in iop_handle_recv()
456 iop_num, chan); in iop_handle_recv()
470 int iop_send_message(uint iop_num, uint chan, void *privdata, in iop_send_message() argument
476 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; in iop_send_message()
485 msg->iop_num = iop_num; in iop_send_message()
491 if (!(q = iop_send_queue[iop_num][chan])) { in iop_send_message()
492 iop_send_queue[iop_num][chan] = msg; in iop_send_message()
498 if (iop_readb(iop_base[iop_num], in iop_send_message()
510 void iop_upload_code(uint iop_num, __u8 *code_start, in iop_upload_code() argument
513 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; in iop_upload_code()
515 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_upload_code()
518 iop_base[iop_num]->ram_data = *code_start++; in iop_upload_code()
526 void iop_download_code(uint iop_num, __u8 *code_start, in iop_download_code() argument
529 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; in iop_download_code()
531 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_download_code()
534 *code_start++ = iop_base[iop_num]->ram_data; in iop_download_code()
544 __u8 *iop_compare_code(uint iop_num, __u8 *code_start, in iop_compare_code() argument
547 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return code_start; in iop_compare_code()
549 iop_loadaddr(iop_base[iop_num], shared_ram_start); in iop_compare_code()
552 if (*code_start != iop_base[iop_num]->ram_data) { in iop_compare_code()
566 uint iop_num = (uint) dev_id; in iop_ism_irq() local
567 volatile struct mac_iop *iop = iop_base[iop_num]; in iop_ism_irq()
581 iop_handle_send(iop_num, i); in iop_ism_irq()
594 iop_handle_recv(iop_num, i); in iop_ism_irq()
602 void iop_ism_irq_poll(uint iop_num) in iop_ism_irq_poll() argument
607 iop_ism_irq(0, (void *)iop_num); in iop_ism_irq_poll()