Commit c58b83be authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k SCSI host templates

Move more M68k SCSI host template definitions from the device-specific header
files to the source files:
  - Amiga A3000, A2091/A590, A4000, A4091, GVP II, and WarpEngine SCSI
  - Atari NCR5380 SCSI
  - MVME147, MVME16x, and BVME6000 SCSI
  - Mac NCR5380 SCSI
  - Sun-3/3x OBIO and VME SCSI
parent f4ba3122
......@@ -231,7 +231,21 @@ int __init a2091_detect(Scsi_Host_Template *tpnt)
#define HOSTS_C
static Scsi_Host_Template driver_template = A2091_SCSI;
static Scsi_Host_Template driver_template = {
.proc_name = "A2901",
.name = "Commodore A2091/A590 SCSI",
.detect = a2091_detect,
.release = a2091_release,
.queuecommand = wd33c93_queuecommand,
.abort = wd33c93_abort,
.reset = wd33c93_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -30,19 +30,6 @@ int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#define CAN_QUEUE 16
#endif
#define A2091_SCSI { .proc_name = "A2901", \
.name = "Commodore A2091/A590 SCSI", \
.detect = a2091_detect, \
.release = a2091_release, \
.queuecommand = wd33c93_queuecommand, \
.abort = wd33c93_abort, \
.reset = wd33c93_reset, \
.can_queue = CAN_QUEUE, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = CMD_PER_LUN, \
.use_clustering = DISABLE_CLUSTERING }
/*
* if the transfer address ANDed with this results in a non-zero
* result, then we can't use DMA.
......
......@@ -207,7 +207,21 @@ int __init a3000_detect(Scsi_Host_Template *tpnt)
#define HOSTS_C
static Scsi_Host_Template driver_template = _A3000_SCSI;
static Scsi_Host_Template driver_template = {
.proc_name = "A3000",
.name = "Amiga 3000 built-in SCSI",
.detect = a3000_detect,
.release = a3000_release,
.queuecommand = wd33c93_queuecommand,
.abort = wd33c93_abort,
.reset = wd33c93_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = ENABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -30,20 +30,6 @@ int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#define CAN_QUEUE 16
#endif
#define _A3000_SCSI { .proc_name = "A3000", \
.proc_info = NULL, \
.name = "Amiga 3000 built-in SCSI", \
.detect = a3000_detect, \
.release = a3000_release, \
.queuecommand = wd33c93_queuecommand, \
.abort = wd33c93_abort, \
.reset = wd33c93_reset, \
.can_queue = CAN_QUEUE, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = CMD_PER_LUN, \
.use_clustering = ENABLE_CLUSTERING }
/*
* if the transfer address ANDed with this results in a non-zero
* result, then we can't use DMA.
......
......@@ -134,5 +134,18 @@ int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
return num;
}
static Scsi_Host_Template driver_template = AMIGA7XX_SCSI;
static Scsi_Host_Template driver_template = {
.name = "Amiga NCR53c710 SCSI",
.detect = amiga7xx_detect,
.queuecommand = NCR53c7xx_queue_command,
.abort = NCR53c7xx_abort,
.reset = NCR53c7xx_reset,
.can_queue = 24,
.this_id = 7,
.sg_tablesize = 63,
.cmd_per_lun = 3,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......@@ -24,15 +24,4 @@ void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#include <scsi/scsicam.h>
#define AMIGA7XX_SCSI {.name = "Amiga NCR53c710 SCSI", \
.detect = amiga7xx_detect, \
.queuecommand = NCR53c7xx_queue_command, \
.abort = NCR53c7xx_abort, \
.reset = NCR53c7xx_reset, \
.can_queue = 24, \
.this_id = 7, \
.sg_tablesize = 63, \
.cmd_per_lun = 3, \
.use_clustering = DISABLE_CLUSTERING }
#endif /* AMIGA7XX_H */
......@@ -1141,7 +1141,23 @@ static void atari_scsi_falcon_reg_write( unsigned char reg, unsigned char value
#include "atari_NCR5380.c"
static Scsi_Host_Template driver_template = ATARI_SCSI;
static Scsi_Host_Template driver_template = {
.proc_info = atari_scsi_proc_info,
.name = "Atari native SCSI",
.detect = atari_scsi_detect,
.release = atari_scsi_release,
.info = atari_scsi_info,
.queuecommand = atari_scsi_queue_command,
.abort = atari_scsi_abort,
.reset = atari_scsi_reset,
.can_queue = 0, /* initialized at run-time */
.this_id = 0, /* initialized at run-time */
.sg_tablesize = 0, /* initialized at run-time */
.cmd_per_lun = 0, /* initialized at run-time */
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
MODULE_LICENSE("GPL");
......@@ -51,20 +51,6 @@ int atari_scsi_release (struct Scsi_Host *);
#define DEFAULT_USE_TAGGED_QUEUING 0
#define ATARI_SCSI { .proc_info = atari_scsi_proc_info, \
.name = "Atari native SCSI", \
.detect = atari_scsi_detect, \
.release = atari_scsi_release, \
.info = atari_scsi_info, \
.queuecommand = atari_scsi_queue_command, \
.abort = atari_scsi_abort, \
.reset = atari_scsi_reset, \
.can_queue = 0, /* initialized at run-time */ \
.this_id = 0, /* initialized at run-time */ \
.sg_tablesize = 0, /* initialized at run-time */ \
.cmd_per_lun = 0, /* initialized at run-time */ \
.use_clustering = DISABLE_CLUSTERING }
#define NCR5380_implementation_fields /* none */
#define NCR5380_read(reg) atari_scsi_reg_read( reg )
......
......@@ -51,5 +51,18 @@ int bvme6000_scsi_detect(Scsi_Host_Template *tpnt)
return 1;
}
static Scsi_Host_Template driver_template = BVME6000_SCSI;
static Scsi_Host_Template driver_template = {
.name = "BVME6000 NCR53c710 SCSI",
.detect = bvme6000_scsi_detect,
.queuecommand = NCR53c7xx_queue_command,
.abort = NCR53c7xx_abort,
.reset = NCR53c7xx_reset,
.can_queue = 24,
.this_id = 7,
.sg_tablesize = 63,
.cmd_per_lun = 3,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......@@ -25,15 +25,4 @@ void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#include <scsi/scsicam.h>
#define BVME6000_SCSI {.name = "BVME6000 NCR53c710 SCSI", \
.detect = bvme6000_scsi_detect, \
.queuecommand = NCR53c7xx_queue_command, \
.abort = NCR53c7xx_abort, \
.reset = NCR53c7xx_reset, \
.can_queue = 24, \
.this_id = 7, \
.sg_tablesize = 63, \
.cmd_per_lun = 3, \
.use_clustering = DISABLE_CLUSTERING }
#endif /* BVME6000_SCSI_H */
......@@ -356,7 +356,21 @@ int __init gvp11_detect(Scsi_Host_Template *tpnt)
#include "gvp11.h"
static Scsi_Host_Template driver_template = GVP11_SCSI;
static Scsi_Host_Template driver_template = {
.proc_name = "GVP11",
.name = "GVP Series II SCSI",
.detect = gvp11_detect,
.release = gvp11_release,
.queuecommand = wd33c93_queuecommand,
.abort = wd33c93_abort,
.reset = wd33c93_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -30,21 +30,7 @@ int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#define CAN_QUEUE 16
#endif
#ifdef HOSTS_C
#define GVP11_SCSI { .proc_name = "GVP11", \
.name = "GVP Series II SCSI", \
.detect = gvp11_detect, \
.release = gvp11_release, \
.queuecommand = wd33c93_queuecommand, \
.abort = wd33c93_abort, \
.reset = wd33c93_reset, \
.can_queue = CAN_QUEUE, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = CMD_PER_LUN, \
.use_clustering = DISABLE_CLUSTERING }
#else
#ifndef HOSTS_C
/*
* if the transfer address ANDed with this results in a non-zero
......
......@@ -3128,7 +3128,21 @@ static int NCR5380_reset( Scsi_Cmnd *cmd, unsigned int reset_flags)
#endif /* 1 */
}
static Scsi_Host_Template driver_template = MAC_NCR5380;
static Scsi_Host_Template driver_template = {
.name = "Macintosh NCR5380 SCSI",
.detect = macscsi_detect,
.release = macscsi_release,
.info = macscsi_info,
.queuecommand = macscsi_queue_command,
.abort = macscsi_abort,
.reset = macscsi_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -116,7 +116,21 @@ int mvme147_detect(Scsi_Host_Template *tpnt)
#include "mvme147.h"
static Scsi_Host_Template driver_template = MVME147_SCSI;
static Scsi_Host_Template driver_template = {
.proc_name = "MVME147",
.name = "MVME147 built-in SCSI",
.detect = mvme147_detect,
.release = mvme147_release,
.queuecommand = wd33c93_queuecommand,
.abort = wd33c93_abort,
.reset = wd33c93_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = ENABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -29,22 +29,4 @@ int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#define CAN_QUEUE 16
#endif
#ifdef HOSTS_C
#define MVME147_SCSI {.proc_name = "MVME147", \
.proc_info = NULL, \
.name = "MVME147 built-in SCSI", \
.detect = mvme147_detect, \
.release = mvme147_release, \
.queuecommand = wd33c93_queuecommand, \
.abort = wd33c93_abort, \
.reset = wd33c93_reset, \
.can_queue = CAN_QUEUE, \
.this_id = 7, \
.sg_tablesize = SG_ALL, \
.cmd_per_lun = CMD_PER_LUN, \
.use_clustering = ENABLE_CLUSTERING }
#endif /* else def HOSTS_C */
#endif /* MVME147_H */
......@@ -53,5 +53,18 @@ int mvme16x_scsi_detect(Scsi_Host_Template *tpnt)
return 1;
}
static Scsi_Host_Template driver_template = MVME16x_SCSI;
static Scsi_Host_Template driver_template = {
.name = "MVME16x NCR53c710 SCSI",
.detect = mvme16x_scsi_detect,
.queuecommand = NCR53c7xx_queue_command,
.abort = NCR53c7xx_abort,
.reset = NCR53c7xx_reset,
.can_queue = 24,
.this_id = 7,
.sg_tablesize = 63,
.cmd_per_lun = 3,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......@@ -25,15 +25,4 @@ void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#include <scsi/scsicam.h>
#define MVME16x_SCSI {.name = "MVME16x NCR53c710 SCSI", \
.detect = mvme16x_scsi_detect, \
.queuecommand = NCR53c7xx_queue_command, \
.abort = NCR53c7xx_abort, \
.reset = NCR53c7xx_reset, \
.can_queue = 24, \
.this_id = 7, \
.sg_tablesize = 63, \
.cmd_per_lun = 3, \
.use_clustering = DISABLE_CLUSTERING }
#endif /* MVME16x_SCSI_H */
......@@ -616,7 +616,21 @@ static int sun3scsi_dma_finish(int write_flag)
#include "sun3_NCR5380.c"
static Scsi_Host_Template driver_template = SUN3_NCR5380;
static Scsi_Host_Template driver_template = {
.name = SUN3_SCSI_NAME,
.detect = sun3scsi_detect,
.release = sun3scsi_release,
.info = sun3scsi_info,
.queuecommand = sun3scsi_queue_command,
.abort = sun3scsi_abort,
.reset = sun3scsi_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_TABLESIZE,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.c"
......
......@@ -93,22 +93,6 @@ static int sun3scsi_release (struct Scsi_Host *);
#define SUN3_SCSI_NAME "Sun3 NCR5380 SCSI"
#endif
#define SUN3_NCR5380 { \
.name = SUN3_SCSI_NAME, \
.detect = sun3scsi_detect, \
.release = sun3scsi_release, /* Release */ \
.info = sun3scsi_info, \
.queuecommand = sun3scsi_queue_command, \
.abort = sun3scsi_abort, \
.reset = sun3scsi_reset, \
.can_queue = CAN_QUEUE, /* can queue */ \
.this_id = 7, /* id */ \
.sg_tablesize = SG_TABLESIZE, /* sg_tablesize */ \
.cmd_per_lun = CMD_PER_LUN, /* cmd per lun */ \
.unchecked_isa_dma = 0, /* unchecked_isa_dma */ \
.use_clustering = DISABLE_CLUSTERING \
}
#ifndef HOSTS_C
#define NCR5380_implementation_fields \
......
......@@ -561,7 +561,21 @@ static int sun3scsi_dma_finish(int write_flag)
#include "sun3_NCR5380.c"
static Scsi_Host_Template driver_template = SUN3_NCR5380;
static Scsi_Host_Template driver_template = {
.name = SUN3_SCSI_NAME,
.detect = sun3scsi_detect,
.release = sun3scsi_release,
.info = sun3scsi_info,
.queuecommand = sun3scsi_queue_command,
.abort = sun3scsi_abort,
.reset = sun3scsi_reset,
.can_queue = CAN_QUEUE,
.this_id = 7,
.sg_tablesize = SG_TABLESIZE,
.cmd_per_lun = CMD_PER_LUN,
.use_clustering = DISABLE_CLUSTERING
};
#include "scsi_module.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