clean
[linux-2.4.21-pre4.git] / drivers / scsi / bvme6000.c
1 /*
2  * Detection routine for the NCR53c710 based MVME16x SCSI Controllers for Linux.
3  *
4  * Based on work by Alan Hourihane
5  */
6 #include <linux/types.h>
7 #include <linux/mm.h>
8 #include <linux/blk.h>
9 #include <linux/sched.h>
10 #include <linux/version.h>
11 #include <linux/zorro.h>
12
13 #include <asm/setup.h>
14 #include <asm/page.h>
15 #include <asm/pgtable.h>
16 #include <asm/bvme6000hw.h>
17 #include <asm/irq.h>
18
19 #include "scsi.h"
20 #include "hosts.h"
21 #include "53c7xx.h"
22 #include "bvme6000.h"
23
24 #include<linux/stat.h>
25
26 extern int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,
27                           u32 base, int io_port, int irq, int dma,
28                           long long options, int clock);
29
30 int bvme6000_scsi_detect(Scsi_Host_Template *tpnt)
31 {
32     static unsigned char called = 0;
33     int clock;
34     long long options;
35
36     if (called)
37         return 0;
38     if (!MACH_IS_BVME6000)
39         return 0;
40
41     tpnt->proc_name = "BVME6000";
42
43     options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
44
45     clock = 40000000;   /* 66MHz SCSI Clock */
46
47     ncr53c7xx_init(tpnt, 0, 710, (u32)BVME_NCR53C710_BASE,
48                         0, BVME_IRQ_SCSI, DMA_NONE,
49                         options, clock);
50     called = 1;
51     return 1;
52 }
53
54 static Scsi_Host_Template driver_template = BVME6000_SCSI;
55 #include "scsi_module.c"