aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/oak.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-03-23 06:10:17 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-04-11 16:57:09 -0400
commit6c4b88ca59ba1a68f707f19dba1744ed19e89fce (patch)
tree0eb88c5980ec178ae214c50dae3b203567665b4f /drivers/scsi/arm/oak.c
parente5d55d1abcef09f7440e6211d5bd673baf547630 (diff)
ncr5380: Use DMA hooks for PDMA
Those wrapper drivers which use DMA define the REAL_DMA macro and those which use pseudo DMA define PSEUDO_DMA. These macros need to be removed for a number of reasons, not least of which is to have drivers share more code. Redefine the PDMA send and receive hooks as DMA setup hooks, so that the DMA code can be shared by all 5380 wrapper drivers. This will help to reunify the forked core driver. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/arm/oak.c')
-rw-r--r--drivers/scsi/arm/oak.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index 63abd6b248a6..5d6e0e590638 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -24,6 +24,8 @@
24 writeb(value, priv(instance)->base + ((reg) << 2)) 24 writeb(value, priv(instance)->base + ((reg) << 2))
25 25
26#define NCR5380_dma_xfer_len(instance, cmd, phase) (0) 26#define NCR5380_dma_xfer_len(instance, cmd, phase) (0)
27#define NCR5380_dma_recv_setup oakscsi_pread
28#define NCR5380_dma_send_setup oakscsi_pwrite
27 29
28#define NCR5380_queue_command oakscsi_queue_command 30#define NCR5380_queue_command oakscsi_queue_command
29#define NCR5380_info oakscsi_info 31#define NCR5380_info oakscsi_info
@@ -39,8 +41,8 @@
39#define STAT ((128 + 16) << 2) 41#define STAT ((128 + 16) << 2)
40#define DATA ((128 + 8) << 2) 42#define DATA ((128 + 8) << 2)
41 43
42static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *addr, 44static inline int oakscsi_pwrite(struct Scsi_Host *instance,
43 int len) 45 unsigned char *addr, int len)
44{ 46{
45 void __iomem *base = priv(instance)->base; 47 void __iomem *base = priv(instance)->base;
46 48
@@ -54,8 +56,8 @@ printk("writing %p len %d\n",addr, len);
54 } 56 }
55} 57}
56 58
57static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *addr, 59static inline int oakscsi_pread(struct Scsi_Host *instance,
58 int len) 60 unsigned char *addr, int len)
59{ 61{
60 void __iomem *base = priv(instance)->base; 62 void __iomem *base = priv(instance)->base;
61printk("reading %p len %d\n", addr, len); 63printk("reading %p len %d\n", addr, len);