summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/g_NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-10-10 00:46:53 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:48 -0500
commit820682b1b34ebb97434c4abc00c744870364e2be (patch)
tree17a46d67ebc54a071dbc3add04c3064a95522f6c /drivers/scsi/g_NCR5380.h
parent25894d1f98aed363bf03e2509d0237c69ab0c8ec (diff)
downloadtalos-obmc-linux-820682b1b34ebb97434c4abc00c744870364e2be.tar.gz
talos-obmc-linux-820682b1b34ebb97434c4abc00c744870364e2be.zip
scsi: ncr5380: Store IO ports and addresses in host private data
The various 5380 drivers inconsistently store register pointers either in the Scsi_Host struct "legacy crap" area or in special, board-specific members of the NCR5380_hostdata struct. Uniform use of the latter struct makes for simpler and faster code (see the following patches) and helps to reduce use of the NCR5380_implementation_fields macro. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/g_NCR5380.h')
-rw-r--r--drivers/scsi/g_NCR5380.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
index 2b77782439f1..ec4d70bef5e5 100644
--- a/drivers/scsi/g_NCR5380.h
+++ b/drivers/scsi/g_NCR5380.h
@@ -17,18 +17,16 @@
#define DRV_MODULE_NAME "g_NCR5380"
#define NCR5380_read(reg) \
- ioread8(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
+ ioread8(((struct NCR5380_hostdata *)shost_priv(instance))->io + \
((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
(reg))
#define NCR5380_write(reg, value) \
- iowrite8(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
+ iowrite8(value, ((struct NCR5380_hostdata *)shost_priv(instance))->io + \
((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
(reg))
#define NCR5380_implementation_fields \
int offset; \
- void __iomem *iomem; \
- resource_size_t iomem_size; \
int c400_ctl_status; \
int c400_blk_cnt; \
int c400_host_buf; \
OpenPOWER on IntegriCloud