Lines Matching refs:qregs

143 		    qpti->qregs + SBUS_CTRL);  in qlogicpti_enable_irqs()
148 sbus_writew(0, qpti->qregs + SBUS_CTRL); in qlogicpti_disable_irqs()
174 sbus_writew(val, qpti->qregs + SBUS_CFG1); in set_sbus_cfg1()
186 tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
188 sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
192 while (--loop_count && (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_HIRQ)) { in qlogicpti_mbox_command()
202 case 6: sbus_writew(param[5], qpti->qregs + MBOX5); in qlogicpti_mbox_command()
204 case 5: sbus_writew(param[4], qpti->qregs + MBOX4); in qlogicpti_mbox_command()
206 case 4: sbus_writew(param[3], qpti->qregs + MBOX3); in qlogicpti_mbox_command()
208 case 3: sbus_writew(param[2], qpti->qregs + MBOX2); in qlogicpti_mbox_command()
210 case 2: sbus_writew(param[1], qpti->qregs + MBOX1); in qlogicpti_mbox_command()
212 case 1: sbus_writew(param[0], qpti->qregs + MBOX0); in qlogicpti_mbox_command()
216 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
218 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
221 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
224 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
226 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
231 (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ)) in qlogicpti_mbox_command()
240 !(sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK)) { in qlogicpti_mbox_command()
244 if (sbus_readw(qpti->qregs + MBOX0) & 0x4000) in qlogicpti_mbox_command()
253 while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04)) in qlogicpti_mbox_command()
261 case 6: param[5] = sbus_readw(qpti->qregs + MBOX5); in qlogicpti_mbox_command()
263 case 5: param[4] = sbus_readw(qpti->qregs + MBOX4); in qlogicpti_mbox_command()
265 case 4: param[3] = sbus_readw(qpti->qregs + MBOX3); in qlogicpti_mbox_command()
267 case 3: param[2] = sbus_readw(qpti->qregs + MBOX2); in qlogicpti_mbox_command()
269 case 2: param[1] = sbus_readw(qpti->qregs + MBOX1); in qlogicpti_mbox_command()
271 case 1: param[0] = sbus_readw(qpti->qregs + MBOX0); in qlogicpti_mbox_command()
275 tmp = sbus_readw(qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
277 sbus_writew(tmp, qpti->qregs + HCCTRL); in qlogicpti_mbox_command()
280 tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
282 sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_mbox_command()
338 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
341 if (sbus_readw(qpti->qregs + CPU_PCTRL) & CPU_PCTRL_BSY) { in qlogicpti_reset_hardware()
342 sbus_writew(CPU_ORIDE_RMOD, qpti->qregs + CPU_ORIDE); in qlogicpti_reset_hardware()
343 sbus_writew(CPU_CMD_BRESET, qpti->qregs + CPU_CMD); in qlogicpti_reset_hardware()
347 sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); in qlogicpti_reset_hardware()
348 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); in qlogicpti_reset_hardware()
349 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); in qlogicpti_reset_hardware()
352 while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04)) in qlogicpti_reset_hardware()
358 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
362 if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { in qlogicpti_reset_hardware()
365 qpti->qregs + RISC_MTREG); in qlogicpti_reset_hardware()
369 qpti->qregs + RISC_MTREG); in qlogicpti_reset_hardware()
377 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_reset_hardware()
517 sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); in qlogicpti_load_firmware()
518 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); in qlogicpti_load_firmware()
519 sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); in qlogicpti_load_firmware()
521 while (--timeout && (sbus_readw(qpti->qregs + SBUS_CTRL) & SBUS_CTRL_RESET)) in qlogicpti_load_firmware()
529 sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
532 sbus_writew((SBUS_CTRL_GENAB | SBUS_CTRL_ERIRQ), qpti->qregs + SBUS_CTRL); in qlogicpti_load_firmware()
534 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_load_firmware()
536 if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { in qlogicpti_load_firmware()
539 qpti->qregs + RISC_MTREG); in qlogicpti_load_firmware()
543 qpti->qregs + RISC_MTREG); in qlogicpti_load_firmware()
546 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
549 sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
550 if (sbus_readw(qpti->qregs + CPU_PDIFF) & CPU_PDIFF_MODE) in qlogicpti_load_firmware()
554 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
583 sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
587 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_load_firmware()
588 sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); in qlogicpti_load_firmware()
719 qpti->qregs = of_ioremap(&op->resource[0], 0, in qpti_map_regs()
722 if (!qpti->qregs) { in qpti_map_regs()
852 qpti->qhost->irq, qpti->qregs); in qlogicpti_info()
963 sbus_writew(in_ptr, qpti->qregs + MBOX4); in load_cmd()
1028 out_ptr = sbus_readw(qpti->qregs + MBOX4); in qlogicpti_queuecommand_lck()
1037 sbus_writew(in_ptr, qpti->qregs + MBOX4); in qlogicpti_queuecommand_lck()
1137 if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT)) in qlogicpti_intr_handler()
1140 in_ptr = sbus_readw(qpti->qregs + MBOX5); in qlogicpti_intr_handler()
1141 sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL); in qlogicpti_intr_handler()
1142 if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK) { in qlogicpti_intr_handler()
1143 switch (sbus_readw(qpti->qregs + MBOX0)) { in qlogicpti_intr_handler()
1154 sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); in qlogicpti_intr_handler()
1194 sbus_writew(out_ptr, qpti->qregs + MBOX5); in qlogicpti_intr_handler()
1400 of_iounmap(&op->resource[0], qpti->qregs, in qpti_sbus_probe()
1421 sbus_writew(0, qpti->qregs + SBUS_CTRL); in qpti_sbus_remove()
1435 of_iounmap(&op->resource[0], qpti->qregs, in qpti_sbus_remove()