Import 2.3.18pre1
[davej-history.git] / drivers / scsi / bvme6000.c
blobc8712e92bde50b376438fd9318d06fba9c9574df
1 /*
2 * Detection routine for the NCR53c710 based MVME16x SCSI Controllers for Linux.
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>
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>
19 #include "scsi.h"
20 #include "hosts.h"
21 #include "53c7xx.h"
22 #include "bvme6000.h"
24 #include<linux/stat.h>
26 struct proc_dir_entry proc_scsi_bvme6000 = {
27 PROC_SCSI_BVME6000, 8, "BVME6000",
28 S_IFDIR | S_IRUGO | S_IXUGO, 2
31 extern ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
32 u32 base, int io_port, int irq, int dma,
33 long long options, int clock);
35 int bvme6000_scsi_detect(Scsi_Host_Template *tpnt)
37 static unsigned char called = 0;
38 int clock;
39 long long options;
41 if (called)
42 return 0;
43 if (!MACH_IS_BVME6000)
44 return 0;
46 tpnt->proc_dir = &proc_scsi_bvme6000;
48 options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
50 clock = 40000000; /* 66MHz SCSI Clock */
52 ncr53c7xx_init(tpnt, 0, 710, (u32)BVME_NCR53C710_BASE,
53 0, BVME_IRQ_SCSI, DMA_NONE,
54 options, clock);
55 called = 1;
56 return 1;