Lines Matching refs:base
273 unsigned int base = data->BaseAddress; in DEF_SCSI_QCMD() local
286 nsp_index_write(base, TRANSFERMODE, transfer_mode_reg); in DEF_SCSI_QCMD()
308 unsigned int base = data->BaseAddress; in nsphw_init() local
310 nsp_dbg(NSP_DEBUG_INIT, "in base=0x%x", base); in nsphw_init()
320 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLMASK); in nsphw_init()
323 nsp_write(base, IFSELECT, IF_IFSEL); in nsphw_init()
325 nsp_index_write(base, SCSIIRQMODE, 0); in nsphw_init()
327 nsp_index_write(base, TRANSFERMODE, MODE_IO8); in nsphw_init()
328 nsp_index_write(base, CLOCKDIV, data->ScsiClockDiv); in nsphw_init()
330 nsp_index_write(base, PARITYCTRL, 0); in nsphw_init()
331 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | in nsphw_init()
337 nsp_write(base, IFSELECT, IF_REGSEL); in nsphw_init()
338 nsp_index_write(base, TERMPWRCTRL, 0); in nsphw_init()
339 if ((nsp_index_read(base, OTHERCONTROL) & TPWR_SENSE) == 0) { in nsphw_init()
341 nsp_index_write(base, TERMPWRCTRL, POWER_ON); in nsphw_init()
344 nsp_index_write(base, TIMERCOUNT, 0); in nsphw_init()
345 nsp_index_write(base, TIMERCOUNT, 0); /* requires 2 times!! */ in nsphw_init()
347 nsp_index_write(base, SYNCREG, 0); in nsphw_init()
348 nsp_index_write(base, ACKWIDTH, 0); in nsphw_init()
351 nsp_index_write(base, SCSIIRQMODE, SCSI_PHASE_CHANGE_EI | in nsphw_init()
354 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLCLEAR); in nsphw_init()
367 unsigned int base = SCpnt->device->host->io_port; in nsphw_start_selection() local
375 phase = nsp_index_read(base, SCSIBUSMON); in nsphw_start_selection()
384 nsp_index_write(base, SETARBIT, ARBIT_GO); in nsphw_start_selection()
389 arbit = nsp_index_read(base, ARBITSTATUS); in nsphw_start_selection()
397 nsp_index_write(base, SETARBIT, ARBIT_FLAG_CLEAR); in nsphw_start_selection()
405 nsp_index_write(base, SCSIDATALATCH, BIT(host_id) | BIT(target)); in nsphw_start_selection()
406 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_BSY | SCSI_ATN); in nsphw_start_selection()
408 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_BSY | SCSI_DATAOUT_ENB | SCSI_ATN); in nsphw_start_selection()
409 nsp_index_write(base, SETARBIT, ARBIT_FLAG_CLEAR); in nsphw_start_selection()
411 nsp_index_write(base, SCSIBUSCTRL, SCSI_SEL | SCSI_DATAOUT_ENB | SCSI_ATN); in nsphw_start_selection()
505 unsigned int base = SCpnt->device->host->io_port; in nsp_start_timer() local
510 nsp_index_write(base, TIMERCOUNT, time); in nsp_start_timer()
519 unsigned int base = SCpnt->device->host->io_port; in nsp_negate_signal() local
528 reg = nsp_index_read(base, SCSIBUSMON); in nsp_negate_signal()
548 unsigned int base = SCpnt->device->host->io_port; in nsp_expect_signal() local
556 phase = nsp_index_read(base, SCSIBUSMON); in nsp_expect_signal()
561 i_src = nsp_read(base, IRQSTATUS); in nsp_expect_signal()
581 unsigned int base = SCpnt->device->host->io_port; in nsp_xfer() local
599 nsp_index_write(base, SCSIBUSCTRL, AUTODIRECTION | ACKENB); in nsp_xfer()
605 buf[ptr] = nsp_index_read(base, SCSIDATAWITHACK); in nsp_xfer()
608 nsp_index_write(base, SCSIDATAWITHACK, buf[ptr]); in nsp_xfer()
653 unsigned int base = SCpnt->device->host->io_port; in nsp_reselected() local
662 id_reg = nsp_index_read(base, RESELECTID); in nsp_reselected()
680 bus_reg = nsp_index_read(base, SCSIBUSCTRL) & ~(SCSI_BSY | SCSI_ATN); in nsp_reselected()
681 nsp_index_write(base, SCSIBUSCTRL, bus_reg); in nsp_reselected()
682 nsp_index_write(base, SCSIBUSCTRL, bus_reg | AUTODIRECTION | ACKENB); in nsp_reselected()
692 unsigned int base = SCpnt->device->host->io_port; in nsp_fifo_count() local
696 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER); in nsp_fifo_count()
698 l = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
699 m = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
700 h = nsp_index_read(base, TRANSFERCOUNT); in nsp_fifo_count()
701 dummy = nsp_index_read(base, TRANSFERCOUNT); /* required this! */ in nsp_fifo_count()
719 unsigned int base = SCpnt->device->host->io_port; in nsp_pio_read() local
720 unsigned long mmio_base = SCpnt->device->host->base; in nsp_pio_read()
738 stat = nsp_index_read(base, SCSIBUSMON); in nsp_pio_read()
754 fifo_stat = nsp_read(base, FIFOSTATUS); in nsp_pio_read()
765 nsp_fifo32_read(base, SCpnt->SCp.ptr, res >> 2); in nsp_pio_read()
768 nsp_fifo8_read (base, SCpnt->SCp.ptr, res ); in nsp_pio_read()
818 unsigned int base = SCpnt->device->host->io_port; in nsp_pio_write() local
819 unsigned long mmio_base = SCpnt->device->host->base; in nsp_pio_write()
836 stat = nsp_index_read(base, SCSIBUSMON); in nsp_pio_write()
864 nsp_fifo32_write(base, SCpnt->SCp.ptr, res >> 2); in nsp_pio_write()
867 nsp_fifo8_write (base, SCpnt->SCp.ptr, res ); in nsp_pio_write()
915 unsigned int base = SCpnt->device->host->io_port; in nsp_nexus() local
924 nsp_index_write(base, SYNCREG, sync->SyncRegister); in nsp_nexus()
925 nsp_index_write(base, ACKWIDTH, sync->AckWidth); in nsp_nexus()
943 nsp_index_write(base, POINTERCLR, POINTER_CLEAR | in nsp_nexus()
957 unsigned int base; in nspintr() local
981 base = data->BaseAddress; in nspintr()
987 nsp_write(base, IRQCONTROL, IRQCONTROL_IRQDISABLE); in nspintr()
988 irq_status = nsp_read(base, IRQSTATUS); in nspintr()
991 nsp_write(base, IRQCONTROL, 0); in nspintr()
1000 phase = nsp_index_read(base, SCSIBUSMON); in nspintr()
1002 irq_phase = nsp_index_read(base, IRQPHASESENCE); in nspintr()
1015 nsp_index_write(base, TIMERCOUNT, 0); in nspintr()
1016 nsp_index_write(base, TIMERCOUNT, 0); in nspintr()
1023 nsp_write(base, IRQCONTROL, IRQCONTROL_TIMER_CLEAR); in nspintr()
1027 nsp_write(base, IRQCONTROL, IRQCONTROL_TIMER_CLEAR | IRQCONTROL_FIFO_CLEAR); in nspintr()
1064 nsp_write(base, IRQCONTROL, IRQCONTROL_RESELECT_CLEAR); in nspintr()
1085 nsp_index_write(base, SCSIBUSCTRL, 0); in nspintr()
1101 nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN); in nspintr()
1103 nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN | AUTODIRECTION | ACKENB); in nspintr()
1175 nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER); in nspintr()
1177 nsp_index_write(base, COMMANDDATA, tmpSC->cmnd[i]); in nspintr()
1179 nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER | AUTO_COMMAND_GO); in nspintr()
1208 tmpSC->SCp.Status = nsp_index_read(base, SCSIDATAWITHACK); in nspintr()
1338 host->base = data->MmioAddress; in nsp_detect()
1346 host->base, in nsp_detect()
1382 …seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - … in nsp_show_info()
1460 unsigned int base = data->BaseAddress; in nsp_bus_reset() local
1463 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLMASK); in nsp_bus_reset()
1465 nsp_index_write(base, SCSIBUSCTRL, SCSI_RST); in nsp_bus_reset()
1467 nsp_index_write(base, SCSIBUSCTRL, 0); in nsp_bus_reset()
1469 nsp_index_read(base, IRQPHASESENCE); /* dummy read */ in nsp_bus_reset()
1474 nsp_write(base, IRQCONTROL, IRQCONTROL_ALLCLEAR); in nsp_bus_reset()