diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-10-10 00:46:53 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:48 -0500 |
commit | 820682b1b34ebb97434c4abc00c744870364e2be (patch) | |
tree | 17a46d67ebc54a071dbc3add04c3064a95522f6c /drivers/scsi/NCR5380.h | |
parent | 25894d1f98aed363bf03e2509d0237c69ab0c8ec (diff) |
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/NCR5380.h')
-rw-r--r-- | drivers/scsi/NCR5380.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h index ceafa0cd80be..02f20ff757ae 100644 --- a/drivers/scsi/NCR5380.h +++ b/drivers/scsi/NCR5380.h | |||
@@ -220,6 +220,8 @@ | |||
220 | 220 | ||
221 | struct NCR5380_hostdata { | 221 | struct NCR5380_hostdata { |
222 | NCR5380_implementation_fields; /* Board-specific data */ | 222 | NCR5380_implementation_fields; /* Board-specific data */ |
223 | u8 __iomem *io; /* Remapped 5380 address */ | ||
224 | u8 __iomem *pdma_io; /* Remapped PDMA address */ | ||
223 | unsigned long poll_loops; /* Register polling limit */ | 225 | unsigned long poll_loops; /* Register polling limit */ |
224 | spinlock_t lock; /* Protects this struct */ | 226 | spinlock_t lock; /* Protects this struct */ |
225 | struct scsi_cmnd *connected; /* Currently connected cmnd */ | 227 | struct scsi_cmnd *connected; /* Currently connected cmnd */ |
@@ -230,6 +232,8 @@ struct NCR5380_hostdata { | |||
230 | int flags; /* Board-specific quirks */ | 232 | int flags; /* Board-specific quirks */ |
231 | int dma_len; /* Requested length of DMA */ | 233 | int dma_len; /* Requested length of DMA */ |
232 | int read_overruns; /* Transfer size reduction for DMA erratum */ | 234 | int read_overruns; /* Transfer size reduction for DMA erratum */ |
235 | unsigned long io_port; /* Device IO port */ | ||
236 | unsigned long base; /* Device base address */ | ||
233 | struct list_head unissued; /* Waiting to be issued */ | 237 | struct list_head unissued; /* Waiting to be issued */ |
234 | struct scsi_cmnd *selecting; /* Cmnd to be connected */ | 238 | struct scsi_cmnd *selecting; /* Cmnd to be connected */ |
235 | struct list_head autosense; /* Priority cmnd queue */ | 239 | struct list_head autosense; /* Priority cmnd queue */ |
@@ -239,6 +243,7 @@ struct NCR5380_hostdata { | |||
239 | unsigned char id_mask; /* 1 << Host ID */ | 243 | unsigned char id_mask; /* 1 << Host ID */ |
240 | unsigned char id_higher_mask; /* All bits above id_mask */ | 244 | unsigned char id_higher_mask; /* All bits above id_mask */ |
241 | unsigned char last_message; /* Last Message Out */ | 245 | unsigned char last_message; /* Last Message Out */ |
246 | unsigned long region_size; /* Size of address/port range */ | ||
242 | char info[256]; | 247 | char info[256]; |
243 | }; | 248 | }; |
244 | 249 | ||