Commit b61bacbc authored by Ondrej Zary's avatar Ondrej Zary Committed by Martin K. Petersen

scsi: g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio drivers

Merge the port-mapped IO and memory-mapped IO support (with the help of
ioport_map) into the g_NCR5380 module and delete g_NCR5380_mmio.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1e879e8f
...@@ -8316,7 +8316,6 @@ F: drivers/scsi/arm/oak.c ...@@ -8316,7 +8316,6 @@ F: drivers/scsi/arm/oak.c
F: drivers/scsi/atari_scsi.* F: drivers/scsi/atari_scsi.*
F: drivers/scsi/dmx3191d.c F: drivers/scsi/dmx3191d.c
F: drivers/scsi/g_NCR5380.* F: drivers/scsi/g_NCR5380.*
F: drivers/scsi/g_NCR5380_mmio.c
F: drivers/scsi/mac_scsi.* F: drivers/scsi/mac_scsi.*
F: drivers/scsi/sun3_scsi.* F: drivers/scsi/sun3_scsi.*
F: drivers/scsi/sun3_scsi_vme.c F: drivers/scsi/sun3_scsi_vme.c
......
...@@ -743,40 +743,18 @@ config SCSI_ISCI ...@@ -743,40 +743,18 @@ config SCSI_ISCI
control unit found in the Intel(R) C600 series chipset. control unit found in the Intel(R) C600 series chipset.
config SCSI_GENERIC_NCR5380 config SCSI_GENERIC_NCR5380
tristate "Generic NCR5380/53c400 SCSI PIO support" tristate "Generic NCR5380/53c400 SCSI ISA card support"
depends on ISA && SCSI depends on ISA && SCSI
select SCSI_SPI_ATTRS select SCSI_SPI_ATTRS
---help--- ---help---
This is a driver for the old NCR 53c80 series of SCSI controllers This is a driver for old ISA card SCSI controllers based on a
on boards using PIO. Most boards such as the Trantor T130 fit this NCR 5380, 53C80, 53C400, 53C400A, or DTC 436 device.
category, along with a large number of ISA 8bit controllers shipped Most boards such as the Trantor T130 fit this category, as do
for free with SCSI scanners. If you have a PAS16, T128 or DMX3191 various 8-bit and 16-bit ISA cards bundled with SCSI scanners.
you should select the specific driver for that card rather than
generic 5380 support.
It is explained in section 3.8 of the SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>. If it doesn't work out
of the box, you may have to change some settings in
<file:drivers/scsi/g_NCR5380.h>.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called g_NCR5380. module will be called g_NCR5380.
config SCSI_GENERIC_NCR5380_MMIO
tristate "Generic NCR5380/53c400 SCSI MMIO support"
depends on ISA && SCSI
select SCSI_SPI_ATTRS
---help---
This is a driver for the old NCR 53c80 series of SCSI controllers
on boards using memory mapped I/O.
It is explained in section 3.8 of the SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>. If it doesn't work out
of the box, you may have to change some settings in
<file:drivers/scsi/g_NCR5380.h>.
To compile this driver as a module, choose M here: the
module will be called g_NCR5380_mmio.
config SCSI_IPS config SCSI_IPS
tristate "IBM ServeRAID support" tristate "IBM ServeRAID support"
depends on PCI && SCSI depends on PCI && SCSI
......
...@@ -74,7 +74,6 @@ obj-$(CONFIG_SCSI_ISCI) += isci/ ...@@ -74,7 +74,6 @@ obj-$(CONFIG_SCSI_ISCI) += isci/
obj-$(CONFIG_SCSI_IPS) += ips.o obj-$(CONFIG_SCSI_IPS) += ips.o
obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o
obj-$(CONFIG_SCSI_GENERIC_NCR5380_MMIO) += g_NCR5380_mmio.o
obj-$(CONFIG_SCSI_NCR53C406A) += NCR53c406a.o obj-$(CONFIG_SCSI_NCR53C406A) += NCR53c406a.o
obj-$(CONFIG_SCSI_NCR_D700) += 53c700.o NCR_D700.o obj-$(CONFIG_SCSI_NCR_D700) += 53c700.o NCR_D700.o
obj-$(CONFIG_SCSI_NCR_Q720) += NCR_Q720_mod.o obj-$(CONFIG_SCSI_NCR_Q720) += NCR_Q720_mod.o
......
This diff is collapsed.
...@@ -14,44 +14,30 @@ ...@@ -14,44 +14,30 @@
#ifndef GENERIC_NCR5380_H #ifndef GENERIC_NCR5380_H
#define GENERIC_NCR5380_H #define GENERIC_NCR5380_H
#ifndef SCSI_G_NCR5380_MEM
#define DRV_MODULE_NAME "g_NCR5380" #define DRV_MODULE_NAME "g_NCR5380"
#define NCR5380_read(reg) \ #define NCR5380_read(reg) \
inb(instance->io_port + (reg)) ioread8(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
(reg))
#define NCR5380_write(reg, value) \ #define NCR5380_write(reg, value) \
outb(value, instance->io_port + (reg)) iowrite8(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
(reg))
#define NCR5380_implementation_fields \ #define NCR5380_implementation_fields \
int offset; \
void __iomem *iomem; \
resource_size_t iomem_size; \
int c400_ctl_status; \ int c400_ctl_status; \
int c400_blk_cnt; \ int c400_blk_cnt; \
int c400_host_buf; \ int c400_host_buf; \
int io_width; int io_width;
#else
/* therefore SCSI_G_NCR5380_MEM */
#define DRV_MODULE_NAME "g_NCR5380_mmio"
#define NCR53C400_mem_base 0x3880 #define NCR53C400_mem_base 0x3880
#define NCR53C400_host_buffer 0x3900 #define NCR53C400_host_buffer 0x3900
#define NCR53C400_region_size 0x3a00 #define NCR53C400_region_size 0x3a00
#define NCR5380_read(reg) \
readb(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
NCR53C400_mem_base + (reg))
#define NCR5380_write(reg, value) \
writeb(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
NCR53C400_mem_base + (reg))
#define NCR5380_implementation_fields \
void __iomem *iomem; \
resource_size_t iomem_size; \
int c400_ctl_status; \
int c400_blk_cnt; \
int c400_host_buf;
#endif
#define NCR5380_dma_xfer_len(instance, cmd, phase) \ #define NCR5380_dma_xfer_len(instance, cmd, phase) \
generic_NCR5380_dma_xfer_len(instance, cmd) generic_NCR5380_dma_xfer_len(instance, cmd)
#define NCR5380_dma_recv_setup generic_NCR5380_pread #define NCR5380_dma_recv_setup generic_NCR5380_pread
...@@ -73,4 +59,3 @@ ...@@ -73,4 +59,3 @@
#define BOARD_HP_C2502 4 #define BOARD_HP_C2502 4
#endif /* GENERIC_NCR5380_H */ #endif /* GENERIC_NCR5380_H */
/*
* There is probably a nicer way to do this but this one makes
* pretty obvious what is happening. We rebuild the same file with
* different options for mmio versus pio.
*/
#define SCSI_G_NCR5380_MEM
#include "g_NCR5380.c"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment