bvme6000_scsi.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) bvme6000_scsi.c (bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022)
1/*
2 * Detection routine for the NCR53c710 based BVME6000 SCSI Controllers for Linux.
3 *
4 * Based on work by Alan Hourihane and Kars de Jong
5 *
6 * Rewritten to use 53c700.c by Richard Hirst <richard@sleepie.demon.co.uk>
7 */
8

--- 22 unchanged lines hidden (view full) ---

31 .module = THIS_MODULE,
32};
33
34static struct platform_device *bvme6000_scsi_device;
35
36static __devinit int
37bvme6000_probe(struct device *dev)
38{
1/*
2 * Detection routine for the NCR53c710 based BVME6000 SCSI Controllers for Linux.
3 *
4 * Based on work by Alan Hourihane and Kars de Jong
5 *
6 * Rewritten to use 53c700.c by Richard Hirst <richard@sleepie.demon.co.uk>
7 */
8

--- 22 unchanged lines hidden (view full) ---

31 .module = THIS_MODULE,
32};
33
34static struct platform_device *bvme6000_scsi_device;
35
36static __devinit int
37bvme6000_probe(struct device *dev)
38{
39 struct Scsi_Host * host = NULL;
39 struct Scsi_Host *host;
40 struct NCR_700_Host_Parameters *hostdata;
41
42 if (!MACH_IS_BVME6000)
43 goto out;
44
40 struct NCR_700_Host_Parameters *hostdata;
41
42 if (!MACH_IS_BVME6000)
43 goto out;
44
45 hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
46 if (hostdata == NULL) {
45 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
46 if (!hostdata) {
47 printk(KERN_ERR "bvme6000-scsi: "
48 "Failed to allocate host data\n");
49 goto out;
50 }
47 printk(KERN_ERR "bvme6000-scsi: "
48 "Failed to allocate host data\n");
49 goto out;
50 }
51 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
52
53 /* Fill in the required pieces of hostdata */
54 hostdata->base = (void __iomem *)BVME_NCR53C710_BASE;
55 hostdata->clock = 40; /* XXX - depends on the CPU clock! */
56 hostdata->chip710 = 1;
57 hostdata->dmode_extra = DMODE_FC2;
58 hostdata->dcntl_extra = EA_710;
59 hostdata->ctest7_extra = CTEST7_TT1;

--- 77 unchanged lines hidden ---
51
52 /* Fill in the required pieces of hostdata */
53 hostdata->base = (void __iomem *)BVME_NCR53C710_BASE;
54 hostdata->clock = 40; /* XXX - depends on the CPU clock! */
55 hostdata->chip710 = 1;
56 hostdata->dmode_extra = DMODE_FC2;
57 hostdata->dcntl_extra = EA_710;
58 hostdata->ctest7_extra = CTEST7_TT1;

--- 77 unchanged lines hidden ---