2 * Detection routine for the NCR53c710 based MVME16x SCSI Controllers for Linux.
4 * Based on work by Alan Hourihane
6 #include <linux/types.h>
8 #include <linux/blkdev.h>
11 #include <asm/pgtable.h>
12 #include <asm/mvme16xhw.h>
16 #include <scsi/scsi_host.h>
20 #include<linux/stat.h>
23 int mvme16x_scsi_detect(struct scsi_host_template *tpnt)
25 static unsigned char called = 0;
31 if (mvme16x_config & MVME16x_CONFIG_NO_SCSICHIP) {
32 printk ("SCSI detection disabled, SCSI chip not present\n");
38 tpnt->proc_name = "MVME16x";
40 options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
42 clock = 66000000; /* 66MHz SCSI Clock */
44 ncr53c7xx_init(tpnt, 0, 710, (unsigned long)0xfff47000,
45 0, MVME16x_IRQ_SCSI, DMA_NONE,
51 static int mvme16x_scsi_release(struct Scsi_Host *shost)
54 free_irq(shost->irq, NULL);
55 if (shost->dma_channel != 0xff)
56 free_dma(shost->dma_channel);
57 if (shost->io_port && shost->n_io_port)
58 release_region(shost->io_port, shost->n_io_port);
59 scsi_unregister(shost);
63 static struct scsi_host_template driver_template = {
64 .name = "MVME16x NCR53c710 SCSI",
65 .detect = mvme16x_scsi_detect,
66 .release = mvme16x_scsi_release,
67 .queuecommand = NCR53c7xx_queue_command,
68 .abort = NCR53c7xx_abort,
69 .reset = NCR53c7xx_reset,
74 .use_clustering = DISABLE_CLUSTERING
78 #include "scsi_module.c"