Lines Matching refs:qbase
85 int qbase = priv->qbase; in ql_zap() local
88 x = inb(qbase + 0xd); in ql_zap()
90 outb(3, qbase + 3); /* reset SCSI */ in ql_zap()
91 outb(2, qbase + 3); /* reset chip */ in ql_zap()
104 int qbase = priv->qbase; in ql_pdma() local
110 if (reqlen >= 128 && (inb(qbase + 8) & 2)) { /* full */ in ql_pdma()
111 insl(qbase + 4, request, 32); in ql_pdma()
116 if ((j = inb(qbase + 8)) & 4) in ql_pdma()
118 insl(qbase + 4, request, 21); in ql_pdma()
122 if (reqlen >= 44 && (inb(qbase + 8) & 8)) { /* 1/3 */ in ql_pdma()
123 insl(qbase + 4, request, 11); in ql_pdma()
135 while (reqlen && !((j = inb(qbase + 8)) & 0x10)) in ql_pdma()
137 *request++ = inb(qbase + 4); in ql_pdma()
141 j = inb(qbase + 8); in ql_pdma()
147 if (reqlen >= 128 && inb(qbase + 8) & 0x10) { /* empty */ in ql_pdma()
148 outsl(qbase + 4, request, 32); in ql_pdma()
153 if (!((j = inb(qbase + 8)) & 8)) { in ql_pdma()
154 outsl(qbase + 4, request, 21); in ql_pdma()
158 if (reqlen >= 40 && !(inb(qbase + 8) & 4)) { /* 2/3 */ in ql_pdma()
159 outsl(qbase + 4, request, 10); in ql_pdma()
169 while (reqlen && !((j = inb(qbase + 8)) & 2)) in ql_pdma()
171 outb(*request++, qbase + 4); in ql_pdma()
175 j = inb(qbase + 8); in ql_pdma()
179 return inb(qbase + 8) & 0xc0; in ql_pdma()
189 int qbase = priv->qbase; in ql_wai() local
195 !((k = inb(qbase + 4)) & 0xe0)) { in ql_wai()
220 int qbase = priv->qbase; in ql_icmd() local
229 inb(qbase + 5); /* clear interrupts */ in ql_icmd()
230 if (inb(qbase + 5)) /* if still interrupting */ in ql_icmd()
231 outb(2, qbase + 3); /* reset chip */ in ql_icmd()
232 else if (inb(qbase + 7) & 0x1f) in ql_icmd()
233 outb(1, qbase + 3); /* clear fifo */ in ql_icmd()
234 while (inb(qbase + 5)); /* clear ints */ in ql_icmd()
236 outb(1, qbase + 8); /* set for PIO pseudo DMA */ in ql_icmd()
237 outb(0, qbase + 0xb); /* disable ints */ in ql_icmd()
238 inb(qbase + 8); /* clear int bits */ in ql_icmd()
240 outb(0x40, qbase + 0xb); /* enable features */ in ql_icmd()
243 outb(qlcfgc, qbase + 0xc); in ql_icmd()
245 outb(0x40 | qlcfg8 | priv->qinitid, qbase + 8); in ql_icmd()
246 outb(qlcfg7, qbase + 7); in ql_icmd()
247 outb(qlcfg6, qbase + 6); in ql_icmd()
248 outb(qlcfg5, qbase + 5); /* select timer */ in ql_icmd()
249 outb(qlcfg9 & 7, qbase + 9); /* prescaler */ in ql_icmd()
251 outb(scmd_id(cmd), qbase + 4); in ql_icmd()
254 outb(cmd->cmnd[i], qbase + 2); in ql_icmd()
257 outb(0x41, qbase + 3); /* select and send command */ in ql_icmd()
274 int qbase = priv->qbase; in ql_pcmd() local
278 j = inb(qbase + 6); in ql_pcmd()
279 i = inb(qbase + 5); in ql_pcmd()
284 i |= inb(qbase + 5); /* the 0x10 bit can be set after the 0x08 */ in ql_pcmd()
300 j, i, inb(qbase + 7) & 0x1f); in ql_pcmd()
306 if (inb(qbase + 7) & 0x1f) /* if some bytes in fifo */ in ql_pcmd()
307 outb(1, qbase + 3); /* clear fifo */ in ql_pcmd()
311 if (reqlen && !((phase = inb(qbase + 4)) & 6)) { /* data phase */ in ql_pcmd()
314 outb(reqlen, qbase); /* low-mid xfer cnt */ in ql_pcmd()
315 outb(reqlen >> 8, qbase + 1); /* low-mid xfer cnt */ in ql_pcmd()
316 outb(reqlen >> 16, qbase + 0xe); /* high xfer cnt */ in ql_pcmd()
317 outb(0x90, qbase + 3); /* command do xfer */ in ql_pcmd()
342 k = inb(qbase + 5); /* should be 0x10, bus service */ in ql_pcmd()
352 !(inb(qbase + 4) & 6)) in ql_pcmd()
362 while (inb(qbase + 5)) in ql_pcmd()
371 outb(0x11, qbase + 3); /* get status and message */ in ql_pcmd()
376 i = inb(qbase + 5); /* get chip irq stat */ in ql_pcmd()
377 j = inb(qbase + 7) & 0x1f; /* and bytes rec'd */ in ql_pcmd()
378 status = inb(qbase + 2); in ql_pcmd()
379 message = inb(qbase + 2); in ql_pcmd()
389 outb(0x12, qbase + 3); /* done, disconnect */ in ql_pcmd()
400 i = inb(qbase + 5); /* should be bus service */ in ql_pcmd()
404 i |= inb(qbase + 5); in ql_pcmd()
430 int qbase = priv->qbase; in ql_ihandl() local
433 if (!(inb(qbase + 4) & 0x80)) /* false alarm? */ in ql_ihandl()
439 while (i-- && inb(qbase + 5)); /* maybe also ql_zap() */ in ql_ihandl()
560 int qlogicfas408_get_chip_type(int qbase, int int_type) in qlogicfas408_get_chip_type() argument
563 return inb(qbase + 0xe) & 0xf8; in qlogicfas408_get_chip_type()
570 void qlogicfas408_setup(int qbase, int id, int int_type) in qlogicfas408_setup() argument
572 outb(1, qbase + 8); /* set for PIO pseudo DMA */ in qlogicfas408_setup()
574 outb(0x40 | qlcfg8 | id, qbase + 8); /* (ini) bus id, disable scsi rst */ in qlogicfas408_setup()
575 outb(qlcfg5, qbase + 5); /* select timer */ in qlogicfas408_setup()
576 outb(qlcfg9, qbase + 9); /* prescaler */ in qlogicfas408_setup()
579 outb(3, qbase + 3); in qlogicfas408_setup()
583 while (inb(qbase + 0xf) & 4) in qlogicfas408_setup()
594 int qlogicfas408_detect(int qbase, int int_type) in qlogicfas408_detect() argument
597 return (((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7) && in qlogicfas408_detect()
598 ((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7)); in qlogicfas408_detect()
607 int qbase = priv->qbase; in qlogicfas408_disable_ints() local
611 outb(0, qbase + 0xb); /* disable ints */ in qlogicfas408_disable_ints()