Lines Matching refs:qregs
137 qpti->qregs + SBUS_CTRL); in qlogicpti_enable_irqs()
142 sbus_writew(0, qpti->qregs + SBUS_CTRL); in qlogicpti_disable_irqs()
168 sbus_writew(val, qpti->qregs + SBUS_CFG1); in set_sbus_cfg1()
180 tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
182 sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
186 while (--loop_count && (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_HIRQ)) { in qlogicpti_mbox_command()
195 case 6: sbus_writew(param[5], qpti->qregs + MBOX5); in qlogicpti_mbox_command()
196 case 5: sbus_writew(param[4], qpti->qregs + MBOX4); in qlogicpti_mbox_command()
197 case 4: sbus_writew(param[3], qpti->qregs + MBOX3); in qlogicpti_mbox_command()
198 case 3: sbus_writew(param[2], qpti->qregs + MBOX2); in qlogicpti_mbox_command()
199 case 2: sbus_writew(param[1], qpti->qregs + MBOX1); in qlogicpti_mbox_command()
200 case 1: sbus_writew(param[0], qpti->qregs + MBOX0); in qlogicpti_mbox_command()
204 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
206 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
209 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
212 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
214 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
219 (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ)) in qlogicpti_mbox_command()
228 !(sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK)) { in qlogicpti_mbox_command()
232 if (sbus_readw(qpti->qregs + MBOX0) & 0x4000) in qlogicpti_mbox_command()
241 while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04)) in qlogicpti_mbox_command()
249 case 6: param[5] = sbus_readw(qpti->qregs + MBOX5); in qlogicpti_mbox_command()
250 case 5: param[4] = sbus_readw(qpti->qregs + MBOX4); in qlogicpti_mbox_command()
251 case 4: param[3] = sbus_readw(qpti->qregs + MBOX3); in qlogicpti_mbox_command()
252 case 3: param[2] = sbus_readw(qpti->qregs + MBOX2); in qlogicpti_mbox_command()
253 case 2: param[1] = sbus_readw(qpti->qregs + MBOX1); in qlogicpti_mbox_command()
254 case 1: param[0] = sbus_readw(qpti->qregs + MBOX0); in qlogicpti_mbox_command()
258 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
260 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
263 tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
265 sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
323 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
326 if (sbus_readw(qpti->qregs + CPU_PCTRL) & CPU_PCTRL_BSY) { in qlogicpti_reset_hardware()
327 sbus_writew(CPU_ORIDE_RMOD, qpti->qregs + CPU_ORIDE); in qlogicpti_reset_hardware()
328 sbus_writew(CPU_CMD_BRESET, qpti->qregs + CPU_CMD); in qlogicpti_reset_hardware()
332 sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); in qlogicpti_reset_hardware()
333 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); in qlogicpti_reset_hardware()
334 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); in qlogicpti_reset_hardware()
337 while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04)) in qlogicpti_reset_hardware()
342 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
346 if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { in qlogicpti_reset_hardware()
349 qpti->qregs + RISC_MTREG); in qlogicpti_reset_hardware()
353 qpti->qregs + RISC_MTREG); in qlogicpti_reset_hardware()
361 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
484 sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); in qlogicpti_load_firmware()
485 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); in qlogicpti_load_firmware()
486 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); in qlogicpti_load_firmware()
488 while (--timeout && (sbus_readw(qpti->qregs + SBUS_CTRL) & SBUS_CTRL_RESET)) in qlogicpti_load_firmware()
496 sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
499 sbus_writew((SBUS_CTRL_GENAB | SBUS_CTRL_ERIRQ), qpti->qregs + SBUS_CTRL); in qlogicpti_load_firmware()
501 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_load_firmware()
503 if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { in qlogicpti_load_firmware()
506 qpti->qregs + RISC_MTREG); in qlogicpti_load_firmware()
510 qpti->qregs + RISC_MTREG); in qlogicpti_load_firmware()
513 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
516 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
517 if (sbus_readw(qpti->qregs + CPU_PDIFF) & CPU_PDIFF_MODE) in qlogicpti_load_firmware()
521 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
550 sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
554 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_load_firmware()
555 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
683 qpti->qregs = sbus_ioremap(&sdev->resource[0], 0, in qpti_map_regs()
686 if (!qpti->qregs) { in qpti_map_regs()
933 sbus_iounmap(qpti->qregs, in qlogicpti_detect()
957 sbus_writew(0, qpti->qregs + SBUS_CTRL); in qlogicpti_release()
971 sbus_iounmap(qpti->qregs, qpti->sdev->reg_addrs[0].reg_size); in qlogicpti_release()
984 __irq_itoa(qpti->qhost->irq), qpti->qregs); in qlogicpti_info()
1100 sbus_writew(in_ptr, qpti->qregs + MBOX4); in load_cmd()
1255 out_ptr = sbus_readw(qpti->qregs + MBOX4); in qlogicpti_queuecommand()
1264 sbus_writew(in_ptr, qpti->qregs + MBOX4); in qlogicpti_queuecommand()
1365 if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT)) in qlogicpti_intr_handler()
1368 in_ptr = sbus_readw(qpti->qregs + MBOX5); in qlogicpti_intr_handler()
1369 sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL); in qlogicpti_intr_handler()
1370 if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK) { in qlogicpti_intr_handler()
1371 switch (sbus_readw(qpti->qregs + MBOX0)) { in qlogicpti_intr_handler()
1382 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_intr_handler()
1428 sbus_writew(out_ptr, qpti->qregs + MBOX5); in qlogicpti_intr_handler()