Lines Matching +full:pio +full:- +full:transfer
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 1997-2000 Russell King, Stefan Hanske
12 * 30-08-1997 RMK 0.0.0 Created, READONLY version as cumana_2.c
13 * 22-01-1998 RMK 0.0.1 Updated to 2.1.80
14 * 15-04-1998 RMK 0.0.1 Only do PIO if FAS216 will allow it.
15 * 11-06-1998 SH 0.0.2 Changed to support ARXE 16-bit SCSI card
17 * 01-01-2000 SH 0.1.0 Added *real* pseudo dma writing
19 * 02-04-2000 RMK 0.1.1 Updated for new error handling code.
20 * 22-10-2000 SH Updated for new registering scheme.
59 * Purpose : initialises DMA/PIO
60 * Params : host - host
61 * SCpnt - command
62 * direction - DMA on to/off of card
63 * min_type - minimum DMA support that we must have for this transfer
64 * Returns : 0 if we should not set CMD_WITHDMA for transfer info command
79 " stmdb sp!, {r0-r12}\n" in arxescsi_pseudo_dma_write()
90 " stmia r2, {r5-r8}\n\t" in arxescsi_pseudo_dma_write()
96 " stmia r2, {r9-r12}\n" in arxescsi_pseudo_dma_write()
99 " ldmia sp!, {r0-r12}\n" in arxescsi_pseudo_dma_write()
105 * Function: int arxescsi_dma_pseudo(host, SCpnt, direction, transfer)
107 * Params : host - host
108 * SCpnt - command
109 * direction - DMA on to/off of card
110 * transfer - minimum number of bytes we expect to transfer
114 fasdmadir_t direction, int transfer) in arxescsi_dma_pseudo() argument
116 struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; in arxescsi_dma_pseudo()
118 void __iomem *base = info->info.scsi.io_base; in arxescsi_dma_pseudo()
121 length = SCp->this_residual; in arxescsi_dma_pseudo()
122 addr = SCp->ptr; in arxescsi_dma_pseudo()
133 length -= 256; in arxescsi_dma_pseudo()
149 length -= 2; in arxescsi_dma_pseudo()
152 length -= 1; in arxescsi_dma_pseudo()
157 if (transfer && (transfer & 255)) { in arxescsi_dma_pseudo()
169 length -= 256; in arxescsi_dma_pseudo()
185 if (--length > 0) { in arxescsi_dma_pseudo()
187 length --; in arxescsi_dma_pseudo()
195 * Purpose : stops DMA/PIO
196 * Params : host - host
197 * SCpnt - command
209 * Params : host - driver host structure to return info for.
214 struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; in arxescsi_info()
218 host->hostt->name, info->info.scsi.type, info->ec->slot_no, in arxescsi_info()
228 info = (struct arxescsi_info *)host->hostdata; in arxescsi_show_info()
230 seq_printf(m, "ARXE 16-bit SCSI driver v%s\n", VERSION); in arxescsi_show_info()
231 fas216_print_host(&info->info, m); in arxescsi_show_info()
232 fas216_print_stats(&info->info, m); in arxescsi_show_info()
233 fas216_print_devices(&info->info, m); in arxescsi_show_info()
249 .dma_boundary = PAGE_SIZE - 1,
266 ret = -ENOMEM; in arxescsi_probe()
272 ret = -ENOMEM; in arxescsi_probe()
276 info = (struct arxescsi_info *)host->hostdata; in arxescsi_probe()
277 info->ec = ec; in arxescsi_probe()
278 info->base = base; in arxescsi_probe()
280 info->info.scsi.io_base = base + 0x2000; in arxescsi_probe()
281 info->info.scsi.irq = 0; in arxescsi_probe()
282 info->info.scsi.dma = NO_DMA; in arxescsi_probe()
283 info->info.scsi.io_shift = 5; in arxescsi_probe()
284 info->info.ifcfg.clockrate = 24; /* MHz */ in arxescsi_probe()
285 info->info.ifcfg.select_timeout = 255; in arxescsi_probe()
286 info->info.ifcfg.asyncperiod = 200; /* ns */ in arxescsi_probe()
287 info->info.ifcfg.sync_max_depth = 0; in arxescsi_probe()
288 info->info.ifcfg.cntl3 = CNTL3_FASTSCSI | CNTL3_FASTCLK; in arxescsi_probe()
289 info->info.ifcfg.disconnect_ok = 0; in arxescsi_probe()
290 info->info.ifcfg.wide_max_size = 0; in arxescsi_probe()
291 info->info.ifcfg.capabilities = FASCAP_PSEUDODMA; in arxescsi_probe()
292 info->info.dma.setup = arxescsi_dma_setup; in arxescsi_probe()
293 info->info.dma.pseudo = arxescsi_dma_pseudo; in arxescsi_probe()
294 info->info.dma.stop = arxescsi_dma_stop; in arxescsi_probe()
296 ec->irqaddr = base; in arxescsi_probe()
297 ec->irqmask = CSTATUS_IRQ; in arxescsi_probe()
303 ret = fas216_add(host, &ec->dev); in arxescsi_probe()