X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fm68k%2Fmac%2Fiop.c;h=0cea21f581926b07241e35ce621d1a6fc2b685fa;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=cf55640d43ded415a6a8d384c16e993f39c57a69;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index cf55640d4..0cea21f58 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -104,7 +104,6 @@ * should execute quickly.) */ -#include #include #include #include @@ -113,9 +112,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -133,7 +132,7 @@ static int iop_get_proc_info(char *, char **, off_t, int); struct listener { const char *devname; - void (*handler)(struct iop_msg *, struct pt_regs *); + void (*handler)(struct iop_msg *); }; /* @@ -153,7 +152,7 @@ static struct iop_msg iop_msg_pool[NUM_IOP_MSGS]; static struct iop_msg *iop_send_queue[NUM_IOPS][NUM_IOP_CHAN]; static struct listener iop_listeners[NUM_IOPS][NUM_IOP_CHAN]; -irqreturn_t iop_ism_irq(int, void *, struct pt_regs *); +irqreturn_t iop_ism_irq(int, void *); extern void oss_irq_enable(int); @@ -261,7 +260,7 @@ void __init iop_preinit(void) } else { iop_base[IOP_NUM_ISM] = (struct mac_iop *) ISM_IOP_BASE_QUADRA; } - iop_base[IOP_NUM_SCC]->status_ctrl = 0; + iop_base[IOP_NUM_ISM]->status_ctrl = 0; iop_ism_present = 1; } else { iop_base[IOP_NUM_ISM] = NULL; @@ -293,8 +292,8 @@ void __init iop_init(void) } for (i = 0 ; i < NUM_IOP_CHAN ; i++) { - iop_send_queue[IOP_NUM_SCC][i] = 0; - iop_send_queue[IOP_NUM_ISM][i] = 0; + iop_send_queue[IOP_NUM_SCC][i] = NULL; + iop_send_queue[IOP_NUM_ISM][i] = NULL; iop_listeners[IOP_NUM_SCC][i].devname = NULL; iop_listeners[IOP_NUM_SCC][i].handler = NULL; iop_listeners[IOP_NUM_ISM][i].devname = NULL; @@ -317,7 +316,7 @@ void __init iop_register_interrupts(void) { if (iop_ism_present) { if (oss_present) { - cpu_request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, + request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, IRQ_FLG_LOCK, "ISM IOP", (void *) IOP_NUM_ISM); oss_irq_enable(IRQ_MAC_ADB); @@ -343,7 +342,7 @@ void __init iop_register_interrupts(void) */ int iop_listen(uint iop_num, uint chan, - void (*handler)(struct iop_msg *, struct pt_regs *), + void (*handler)(struct iop_msg *), const char *devname) { if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; @@ -408,7 +407,7 @@ static void iop_do_send(struct iop_msg *msg) * has gone into the IOP_MSG_COMPLETE state. */ -static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs) +static void iop_handle_send(uint iop_num, uint chan) { volatile struct mac_iop *iop = iop_base[iop_num]; struct iop_msg *msg,*msg2; @@ -427,7 +426,7 @@ static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs) for (i = 0 ; i < IOP_MSG_LEN ; i++, offset++) { msg->reply[i] = iop_readb(iop, offset); } - if (msg->handler) (*msg->handler)(msg, regs); + if (msg->handler) (*msg->handler)(msg); msg2 = msg; msg = msg->next; iop_free_msg(msg2); @@ -441,7 +440,7 @@ static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs) * gone into the IOP_MSG_NEW state. */ -static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs) +static void iop_handle_recv(uint iop_num, uint chan) { volatile struct mac_iop *iop = iop_base[iop_num]; int i,offset; @@ -469,7 +468,7 @@ static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs) /* the message ourselves to avoid possible stalls. */ if (msg->handler) { - (*msg->handler)(msg, regs); + (*msg->handler)(msg); } else { #ifdef DEBUG_IOP printk("iop_handle_recv: unclaimed message on iop %d channel %d\n", iop_num, chan); @@ -485,7 +484,7 @@ static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs) /* * Send a message - * + * * The message is placed at the end of the send queue. Afterwards if the * channel is idle we force an immediate send of the next message in the * queue. @@ -493,7 +492,7 @@ static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs) int iop_send_message(uint iop_num, uint chan, void *privdata, uint msg_len, __u8 *msg_data, - void (*handler)(struct iop_msg *, struct pt_regs *)) + void (*handler)(struct iop_msg *)) { struct iop_msg *msg, *q; @@ -537,7 +536,7 @@ void iop_upload_code(uint iop_num, __u8 *code_start, if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; iop_loadaddr(iop_base[iop_num], shared_ram_start); - + while (code_len--) { iop_base[iop_num]->ram_data = *code_start++; } @@ -553,7 +552,7 @@ void iop_download_code(uint iop_num, __u8 *code_start, if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return; iop_loadaddr(iop_base[iop_num], shared_ram_start); - + while (code_len--) { *code_start++ = iop_base[iop_num]->ram_data; } @@ -571,7 +570,7 @@ __u8 *iop_compare_code(uint iop_num, __u8 *code_start, if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return code_start; iop_loadaddr(iop_base[iop_num], shared_ram_start); - + while (code_len--) { if (*code_start != iop_base[iop_num]->ram_data) { return code_start; @@ -585,7 +584,7 @@ __u8 *iop_compare_code(uint iop_num, __u8 *code_start, * Handle an ISM IOP interrupt */ -irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t iop_ism_irq(int irq, void *dev_id) { uint iop_num = (uint) dev_id; volatile struct mac_iop *iop = iop_base[iop_num]; @@ -609,7 +608,7 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs) printk(" %02X", state); #endif if (state == IOP_MSG_COMPLETE) { - iop_handle_send(iop_num, i, regs); + iop_handle_send(iop_num, i); } } #ifdef DEBUG_IOP @@ -629,7 +628,7 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs) printk(" %02X", state); #endif if (state == IOP_MSG_NEW) { - iop_handle_recv(iop_num, i, regs); + iop_handle_recv(iop_num, i); } } #ifdef DEBUG_IOP @@ -666,12 +665,12 @@ int iop_dump_one_iop(char *buf, int iop_num, char *iop_name) iop_chan_state(iop_readb(iop, IOP_ADDR_RECV_STATE+i)), iop_listeners[iop_num][i].handler? iop_listeners[iop_num][i].devname : ""); - + } len += sprintf(buf+len, "\n"); return len; } - + static int iop_get_proc_info(char *buf, char **start, off_t pos, int count) { int len, cnt;