Lines Matching refs:base
274 unsigned int base = data->BaseAddress; in DEF_SCSI_QCMD() local
287 nsp_index_write(base, TRANSFERMODE, transfer_mode_reg); in DEF_SCSI_QCMD()
309 unsigned int base = data->BaseAddress; in nsphw_init() local
311 nsp_dbg(NSP_DEBUG_INIT, "in base=0x%x", base); in nsphw_init()
321 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLMASK); in nsphw_init()
324 nsp_write(base, IFSELECT, IF_IFSEL); in nsphw_init()
326 nsp_index_write(base, SCSIIRQMODE, 0); in nsphw_init()
328 nsp_index_write(base, TRANSFERMODE, MODE_IO8); in nsphw_init()
329 nsp_index_write(base, CLOCKDIV, data->ScsiClockDiv); in nsphw_init()
331 nsp_index_write(base, PARITYCTRL, 0); in nsphw_init()
332 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | in nsphw_init()
338 nsp_write(base, IFSELECT, IF_REGSEL); in nsphw_init()
339 nsp_index_write(base, TERMPWRCTRL, 0); in nsphw_init()
340 if ((nsp_index_read(base, OTHERCONTROL) & TPWR_SENSE) == 0) { in nsphw_init()
342 nsp_index_write(base, TERMPWRCTRL, POWER_ON); in nsphw_init()
345 nsp_index_write(base, TIMERCOUNT, 0); in nsphw_init()
346 nsp_index_write(base, TIMERCOUNT, 0); /* requires 2 times!! */ in nsphw_init()
348 nsp_index_write(base, SYNCREG, 0); in nsphw_init()
349 nsp_index_write(base, ACKWIDTH, 0); in nsphw_init()
352 nsp_index_write(base, SCSIIRQMODE, SCSI_PHASE_CHANGE_EI | in nsphw_init()
355 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLCLEAR); in nsphw_init()
368 unsigned int base = SCpnt->device->host->io_port; in nsphw_start_selection() local
376 phase = nsp_index_read(base, SCSIBUSMON); in nsphw_start_selection()
385 nsp_index_write(base, SETARBIT, ARBIT_GO); in nsphw_start_selection()
390 arbit = nsp_index_read(base, ARBITSTATUS); in nsphw_start_selection()
398 nsp_index_write(base, SETARBIT, ARBIT_FLAG_CLEAR); in nsphw_start_selection()
406 nsp_index_write(base, SCSIDATALATCH, BIT(host_id) | BIT(target)); in nsphw_start_selection()
407 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_BSY | SCSI_ATN); in nsphw_start_selection()
409 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_BSY | SCSI_DATAOUT_ENB | SCSI_ATN); in nsphw_start_selection()
410 nsp_index_write(base, SETARBIT, ARBIT_FLAG_CLEAR); in nsphw_start_selection()
412 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_DATAOUT_ENB | SCSI_ATN); in nsphw_start_selection()
506 unsigned int base = SCpnt->device->host->io_port; in nsp_start_timer() local
511 nsp_index_write(base, TIMERCOUNT, time); in nsp_start_timer()
520 unsigned int base = SCpnt->device->host->io_port; in nsp_negate_signal() local
529 reg = nsp_index_read(base, SCSIBUSMON); in nsp_negate_signal()
549 unsigned int base = SCpnt->device->host->io_port; in nsp_expect_signal() local
557 phase = nsp_index_read(base, SCSIBUSMON); in nsp_expect_signal()
562 i_src = nsp_read(base, IRQSTATUS); in nsp_expect_signal()
582 unsigned int base = SCpnt->device->host->io_port; in nsp_xfer() local
600 nsp_index_write(base, SCSIBUSCTRL, AUTODIRECTION | ACKENB); in nsp_xfer()
606 buf[ptr] = nsp_index_read(base, SCSIDATAWITHACK); in nsp_xfer()
609 nsp_index_write(base, SCSIDATAWITHACK, buf[ptr]); in nsp_xfer()
654 unsigned int base = SCpnt->device->host->io_port; in nsp_reselected() local
663 id_reg = nsp_index_read(base, RESELECTID); in nsp_reselected()
681 bus_reg = nsp_index_read(base, SCSIBUSCTRL) & ~(SCSI_BSY | SCSI_ATN); in nsp_reselected()
682 nsp_index_write(base, SCSIBUSCTRL, bus_reg); in nsp_reselected()
683 nsp_index_write(base, SCSIBUSCTRL, bus_reg | AUTODIRECTION | ACKENB); in nsp_reselected()
693 unsigned int base = SCpnt->device->host->io_port; in nsp_fifo_count() local
697 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER); in nsp_fifo_count()
699 l = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
700 m = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
701 h = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
702 dummy = nsp_index_read(base, TRANSFERCOUNT); /* required this! */ in nsp_fifo_count()
720 unsigned int base = SCpnt->device->host->io_port; in nsp_pio_read() local
721 unsigned long mmio_base = SCpnt->device->host->base; in nsp_pio_read()
739 stat = nsp_index_read(base, SCSIBUSMON); in nsp_pio_read()
755 fifo_stat = nsp_read(base, FIFOSTATUS); in nsp_pio_read()
766 nsp_fifo32_read(base, SCpnt->SCp.ptr, res >> 2); in nsp_pio_read()
769 nsp_fifo8_read (base, SCpnt->SCp.ptr, res ); in nsp_pio_read()
819 unsigned int base = SCpnt->device->host->io_port; in nsp_pio_write() local
820 unsigned long mmio_base = SCpnt->device->host->base; in nsp_pio_write()
837 stat = nsp_index_read(base, SCSIBUSMON); in nsp_pio_write()
865 nsp_fifo32_write(base, SCpnt->SCp.ptr, res >> 2); in nsp_pio_write()
868 nsp_fifo8_write (base, SCpnt->SCp.ptr, res ); in nsp_pio_write()
916 unsigned int base = SCpnt->device->host->io_port; in nsp_nexus() local
925 nsp_index_write(base, SYNCREG, sync->SyncRegister); in nsp_nexus()
926 nsp_index_write(base, ACKWIDTH, sync->AckWidth); in nsp_nexus()
944 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | in nsp_nexus()
958 unsigned int base; in nspintr() local
982 base = data->BaseAddress; in nspintr()
988 nsp_write(base, IRQCONTROL, IRQCONTROL_IRQDISABLE); in nspintr()
989 irq_status = nsp_read(base, IRQSTATUS); in nspintr()
992 nsp_write(base, IRQCONTROL, 0); in nspintr()
1001 phase = nsp_index_read(base, SCSIBUSMON); in nspintr()
1003 irq_phase = nsp_index_read(base, IRQPHASESENCE); in nspintr()
1016 nsp_index_write(base, TIMERCOUNT, 0); in nspintr()
1017 nsp_index_write(base, TIMERCOUNT, 0); in nspintr()
1024 nsp_write(base, IRQCONTROL, IRQCONTROL_TIMER_CLEAR); in nspintr()
1028 nsp_write(base, IRQCONTROL, IRQCONTROL_TIMER_CLEAR | IRQCONTROL_FIFO_CLEAR); in nspintr()
1065 nsp_write(base, IRQCONTROL, IRQCONTROL_RESELECT_CLEAR); in nspintr()
1086 nsp_index_write(base, SCSIBUSCTRL, 0); in nspintr()
1102 nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN); in nspintr()
1104 nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN | AUTODIRECTION | ACKENB); in nspintr()
1176 nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER); in nspintr()
1178 nsp_index_write(base, COMMANDDATA, tmpSC->cmnd[i]); in nspintr()
1180 nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER | AUTO_COMMAND_GO); in nspintr()
1209 tmpSC->SCp.Status = nsp_index_read(base, SCSIDATAWITHACK); in nspintr()
1339 host->base = data->MmioAddress; in nsp_detect()
1347 host->base, in nsp_detect()
1383 …seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - … in nsp_show_info()
1461 unsigned int base = data->BaseAddress; in nsp_bus_reset() local
1464 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLMASK); in nsp_bus_reset()
1466 nsp_index_write(base, SCSIBUSCTRL, SCSI_RST); in nsp_bus_reset()
1468 nsp_index_write(base, SCSIBUSCTRL, 0); in nsp_bus_reset()
1470 nsp_index_read(base, IRQPHASESENCE); /* dummy read */ in nsp_bus_reset()
1475 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLCLEAR); in nsp_bus_reset()