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

scsi: g_NCR5380: Stop using scsi_module.c

Convert g_NCR5380 to use scsi_add_host instead of scsi_module.c Use
pnp_driver and isa_driver to manage cards.

In order to support multiple cards, new module parameter format is
introduced. The old parameters are kept for compatibility.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Acked-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d91f5afe
...@@ -28,6 +28,16 @@ time. More info to come in the future. ...@@ -28,6 +28,16 @@ time. More info to come in the future.
This driver works as a module. This driver works as a module.
When included as a module, parameters can be passed on the insmod/modprobe When included as a module, parameters can be passed on the insmod/modprobe
command line: command line:
irq=xx[,...] the interrupt(s)
base=xx[,...] the port or base address(es) (for port or memory mapped, resp.)
card=xx[,...] card type(s):
0 = NCR5380,
1 = NCR53C400,
2 = NCR53C400A,
3 = Domex Technology Corp 3181E (DTC3181E)
4 = Hewlett Packard C2502
These old-style parameters can support only one card:
ncr_irq=xx the interrupt ncr_irq=xx the interrupt
ncr_addr=xx the port or base address (for port or memory ncr_addr=xx the port or base address (for port or memory
mapped, resp.) mapped, resp.)
...@@ -36,11 +46,19 @@ command line: ...@@ -36,11 +46,19 @@ command line:
ncr_53c400a=1 to set up for a NCR53C400A board ncr_53c400a=1 to set up for a NCR53C400A board
dtc_3181e=1 to set up for a Domex Technology Corp 3181E board dtc_3181e=1 to set up for a Domex Technology Corp 3181E board
hp_c2502=1 to set up for a Hewlett Packard C2502 board hp_c2502=1 to set up for a Hewlett Packard C2502 board
e.g. e.g.
modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1 OLD: modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
NEW: modprobe g_NCR5380 irq=5 base=0x350 card=0
for a port mapped NCR5380 board or for a port mapped NCR5380 board or
modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
for a memory mapped NCR53C400 board with interrupts disabled. OLD: modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
NEW: modprobe g_NCR5380 irq=255 base=0xc8000 card=1
for a memory mapped NCR53C400 board with interrupts disabled or
NEW: modprobe g_NCR5380 irq=0,7 base=0x240,0x300 card=3,4
for two cards: DTC3181 (in non-PnP mode) at 0x240 with no IRQ
and HP C2502 at 0x300 with IRQ 7
(255 should be specified for no or DMA interrupt, 254 to autoprobe for an (255 should be specified for no or DMA interrupt, 254 to autoprobe for an
IRQ line if overridden on the command line.) IRQ line if overridden on the command line.)
......
This diff is collapsed.
...@@ -14,15 +14,9 @@ ...@@ -14,15 +14,9 @@
#ifndef GENERIC_NCR5380_H #ifndef GENERIC_NCR5380_H
#define GENERIC_NCR5380_H #define GENERIC_NCR5380_H
#define __STRVAL(x) #x
#define STRVAL(x) __STRVAL(x)
#ifndef SCSI_G_NCR5380_MEM #ifndef SCSI_G_NCR5380_MEM
#define DRV_MODULE_NAME "g_NCR5380" #define DRV_MODULE_NAME "g_NCR5380"
#define NCR5380_map_type int
#define NCR5380_map_name port
#define NCR5380_read(reg) \ #define NCR5380_read(reg) \
inb(instance->io_port + (reg)) inb(instance->io_port + (reg))
#define NCR5380_write(reg, value) \ #define NCR5380_write(reg, value) \
...@@ -38,8 +32,6 @@ ...@@ -38,8 +32,6 @@
/* therefore SCSI_G_NCR5380_MEM */ /* therefore SCSI_G_NCR5380_MEM */
#define DRV_MODULE_NAME "g_NCR5380_mmio" #define DRV_MODULE_NAME "g_NCR5380_mmio"
#define NCR5380_map_type unsigned long
#define NCR5380_map_name base
#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
......
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