Lines Matching defs:iop
164 static __inline__ void iop_loadaddr(volatile struct mac_iop *iop, __u16 addr)
166 iop->ram_addr_lo = addr;
167 iop->ram_addr_hi = addr >> 8;
170 static __inline__ __u8 iop_readb(volatile struct mac_iop *iop, __u16 addr)
172 iop->ram_addr_lo = addr;
173 iop->ram_addr_hi = addr >> 8;
174 return iop->ram_data;
177 static __inline__ void iop_writeb(volatile struct mac_iop *iop, __u16 addr, __u8 data)
179 iop->ram_addr_lo = addr;
180 iop->ram_addr_hi = addr >> 8;
181 iop->ram_data = data;
184 static __inline__ void iop_stop(volatile struct mac_iop *iop)
186 iop->status_ctrl = IOP_AUTOINC;
189 static __inline__ void iop_start(volatile struct mac_iop *iop)
191 iop->status_ctrl = IOP_RUN | IOP_AUTOINC;
194 static __inline__ void iop_interrupt(volatile struct mac_iop *iop)
196 iop->status_ctrl = IOP_IRQ | IOP_RUN | IOP_AUTOINC;
199 static int iop_alive(volatile struct mac_iop *iop)
203 retval = (iop_readb(iop, IOP_ADDR_ALIVE) == 0xFF);
204 iop_writeb(iop, IOP_ADDR_ALIVE, 0);
372 volatile struct mac_iop *iop = iop_base[msg->iop_num];
381 iop_writeb(iop, offset, msg->message[i]);
384 iop_writeb(iop, IOP_ADDR_SEND_STATE + msg->channel, IOP_MSG_NEW);
386 iop_interrupt(iop);
396 volatile struct mac_iop *iop = iop_base[iop_num];
400 iop_writeb(iop, IOP_ADDR_SEND_STATE + chan, IOP_MSG_IDLE);
407 msg->reply[i] = iop_readb(iop, offset);
416 if (msg && iop_readb(iop, IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE)
427 volatile struct mac_iop *iop = iop_base[iop_num];
440 msg->message[i] = iop_readb(iop, offset);
445 iop_writeb(iop, IOP_ADDR_RECV_STATE + chan, IOP_MSG_RCVD);
559 volatile struct mac_iop *iop = iop_base[iop_num];
561 u8 events = iop->status_ctrl & (IOP_INT0 | IOP_INT1);
565 iop->status_ctrl);
569 iop->status_ctrl = IOP_INT0 | IOP_RUN | IOP_AUTOINC;
571 state = iop_readb(iop, IOP_ADDR_SEND_STATE + i);
582 iop->status_ctrl = IOP_INT1 | IOP_RUN | IOP_AUTOINC;
584 state = iop_readb(iop, IOP_ADDR_RECV_STATE + i);
593 events = iop->status_ctrl & (IOP_INT0 | IOP_INT1);