Lines Matching refs:adb
62 static volatile struct adb_regs __iomem *adb; variable
110 adb = ioremap(r.start, sizeof(struct adb_regs)); in macio_init()
111 if (!adb) { in macio_init()
116 out_8(&adb->ctrl.r, 0); in macio_init()
117 out_8(&adb->intr.r, 0); in macio_init()
118 out_8(&adb->error.r, 0); in macio_init()
119 out_8(&adb->active_hi.r, 0xff); /* for now, set all devices active */ in macio_init()
120 out_8(&adb->active_lo.r, 0xff); in macio_init()
121 out_8(&adb->autopoll.r, APE); in macio_init()
129 out_8(&adb->intr_enb.r, DFB | TAG); in macio_init()
141 out_8(&adb->active_hi.r, devs >> 8); in macio_adb_autopoll()
142 out_8(&adb->active_lo.r, devs); in macio_adb_autopoll()
143 out_8(&adb->autopoll.r, devs? APE: 0); in macio_adb_autopoll()
159 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | ADB_RST); in macio_adb_reset_bus()
160 while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) { in macio_adb_reset_bus()
162 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST); in macio_adb_reset_bus()
195 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR); in macio_send_request()
218 if (in_8(&adb->intr.r) & TAG) { in macio_adb_interrupt()
224 out_8(&adb->data[i].r, req->data[i]); in macio_adb_interrupt()
225 out_8(&adb->dcount.r, req->nbytes & HMB); in macio_adb_interrupt()
228 out_8(&adb->ctrl.r, DTB + CRE); in macio_adb_interrupt()
230 out_8(&adb->ctrl.r, DTB); in macio_adb_interrupt()
234 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR); in macio_adb_interrupt()
237 out_8(&adb->intr.r, 0); in macio_adb_interrupt()
240 if (in_8(&adb->intr.r) & DFB) { in macio_adb_interrupt()
242 err = in_8(&adb->error.r); in macio_adb_interrupt()
247 req->reply_len = in_8(&adb->dcount.r) & HMB; in macio_adb_interrupt()
249 req->reply[i] = in_8(&adb->data[i].r); in macio_adb_interrupt()
254 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) | TAR); in macio_adb_interrupt()
257 n = in_8(&adb->dcount.r) & HMB; in macio_adb_interrupt()
259 ibuf[i] = in_8(&adb->data[i].r); in macio_adb_interrupt()
261 autopoll = (in_8(&adb->dcount.r) & APD) != 0; in macio_adb_interrupt()
263 out_8(&adb->error.r, 0); in macio_adb_interrupt()
264 out_8(&adb->intr.r, 0); in macio_adb_interrupt()
288 if (in_8(&adb->intr.r) != 0) in macio_adb_poll()