* better
[mascara-docs.git] / i386 / linux-2.3.21 / drivers / scsi / mvme16x.c
blob085b41615e424bb2746aca7d1a9a5656a4460d9f
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>
12 #include <asm/page.h>
13 #include <asm/pgtable.h>
14 #include <asm/mvme16xhw.h>
15 #include <asm/irq.h>
17 #include "scsi.h"
18 #include "hosts.h"
19 #include "53c7xx.h"
20 #include "mvme16x.h"
22 #include<linux/stat.h>
24 struct proc_dir_entry proc_scsi_mvme16x = {
25 PROC_SCSI_MVME16x, 7, "MVME16x",
26 S_IFDIR | S_IRUGO | S_IXUGO, 2
29 extern ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
30 u32 base, int io_port, int irq, int dma,
31 long long options, int clock);
33 int mvme16x_scsi_detect(Scsi_Host_Template *tpnt)
35 static unsigned char called = 0;
36 int clock;
37 long long options;
39 if (!MACH_IS_MVME16x)
40 return 0;
41 if (mvme16x_config & MVME16x_CONFIG_NO_SCSICHIP) {
42 printk ("SCSI detection disabled, SCSI chip not present\n");
43 return 0;
45 if (called)
46 return 0;
48 tpnt->proc_dir = &proc_scsi_mvme16x;
50 options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
52 clock = 66000000; /* 66MHz SCSI Clock */
54 ncr53c7xx_init(tpnt, 0, 710, (u32)0xfff47000,
55 0, MVME16x_IRQ_SCSI, DMA_NONE,
56 options, clock);
57 called = 1;
58 return 1;