2 * Detection routine for the NCR53c710 based BVME6000 SCSI Controllers for Linux.
4 * Based on work by Alan Hourihane
6 #include <linux/types.h>
8 #include <linux/blkdev.h>
9 #include <linux/zorro.h>
11 #include <asm/setup.h>
13 #include <asm/pgtable.h>
14 #include <asm/bvme6000hw.h>
18 #include <scsi/scsi_host.h>
22 #include<linux/stat.h>
25 int bvme6000_scsi_detect(struct scsi_host_template *tpnt)
27 static unsigned char called = 0;
33 if (!MACH_IS_BVME6000)
36 tpnt->proc_name = "BVME6000";
38 options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
40 clock = 40000000; /* 66MHz SCSI Clock */
42 ncr53c7xx_init(tpnt, 0, 710, (unsigned long)BVME_NCR53C710_BASE,
43 0, BVME_IRQ_SCSI, DMA_NONE,
49 static int bvme6000_scsi_release(struct Scsi_Host *shost)
52 free_irq(shost->irq, NULL);
53 if (shost->dma_channel != 0xff)
54 free_dma(shost->dma_channel);
55 if (shost->io_port && shost->n_io_port)
56 release_region(shost->io_port, shost->n_io_port);
57 scsi_unregister(shost);
61 static struct scsi_host_template driver_template = {
62 .name = "BVME6000 NCR53c710 SCSI",
63 .detect = bvme6000_scsi_detect,
64 .release = bvme6000_scsi_release,
65 .queuecommand = NCR53c7xx_queue_command,
66 .abort = NCR53c7xx_abort,
67 .reset = NCR53c7xx_reset,
72 .use_clustering = DISABLE_CLUSTERING
76 #include "scsi_module.c"