Lines Matching defs:iop
168 static __inline__ void iop_loadaddr(volatile struct mac_iop *iop, __u16 addr)
170 iop->ram_addr_lo = addr;
171 iop->ram_addr_hi = addr >> 8;
174 static __inline__ __u8 iop_readb(volatile struct mac_iop *iop, __u16 addr)
176 iop->ram_addr_lo = addr;
177 iop->ram_addr_hi = addr >> 8;
178 return iop->ram_data;
181 static __inline__ void iop_writeb(volatile struct mac_iop *iop, __u16 addr, __u8 data)
183 iop->ram_addr_lo = addr;
184 iop->ram_addr_hi = addr >> 8;
185 iop->ram_data = data;
188 static __inline__ void iop_stop(volatile struct mac_iop *iop)
190 iop->status_ctrl = IOP_AUTOINC;
193 static __inline__ void iop_start(volatile struct mac_iop *iop)
195 iop->status_ctrl = IOP_RUN | IOP_AUTOINC;
198 static __inline__ void iop_interrupt(volatile struct mac_iop *iop)
200 iop->status_ctrl = IOP_IRQ | IOP_RUN | IOP_AUTOINC;
203 static int iop_alive(volatile struct mac_iop *iop)
207 retval = (iop_readb(iop, IOP_ADDR_ALIVE) == 0xFF);
208 iop_writeb(iop, IOP_ADDR_ALIVE, 0);
354 volatile struct mac_iop *iop = iop_base[msg->iop_num];
363 iop_writeb(iop, offset, msg->message[i]);
366 iop_writeb(iop, IOP_ADDR_SEND_STATE + msg->channel, IOP_MSG_NEW);
368 iop_interrupt(iop);
378 volatile struct mac_iop *iop = iop_base[iop_num];
382 iop_writeb(iop, IOP_ADDR_SEND_STATE + chan, IOP_MSG_IDLE);
389 msg->reply[i] = iop_readb(iop, offset);
398 if (msg && iop_readb(iop, IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE)
409 volatile struct mac_iop *iop = iop_base[iop_num];
422 msg->message[i] = iop_readb(iop, offset);
427 iop_writeb(iop, IOP_ADDR_RECV_STATE + chan, IOP_MSG_RCVD);
541 volatile struct mac_iop *iop = iop_base[iop_num];
543 u8 events = iop->status_ctrl & (IOP_INT0 | IOP_INT1);
547 iop->status_ctrl);
551 iop->status_ctrl = IOP_INT0 | IOP_RUN | IOP_AUTOINC;
553 state = iop_readb(iop, IOP_ADDR_SEND_STATE + i);
564 iop->status_ctrl = IOP_INT1 | IOP_RUN | IOP_AUTOINC;
566 state = iop_readb(iop, IOP_ADDR_RECV_STATE + i);
575 events = iop->status_ctrl & (IOP_INT0 | IOP_INT1);