a4000t.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) a4000t.c (bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022)
1/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga Technologies A4000T SCSI controller.
4 *
5 * Written 1997 by Alan Hourihane <alanh@fairlite.demon.co.uk>
6 * plus modifications of the 53c7xx.c driver to support the Amiga.
7 *
8 * Rewritten to use 53c700.c by Kars de Jong <jongk@linux-m68k.org>

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

32};
33
34static struct platform_device *a4000t_scsi_device;
35
36#define A4000T_SCSI_ADDR 0xdd0040
37
38static int __devinit a4000t_probe(struct device *dev)
39{
1/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga Technologies A4000T SCSI controller.
4 *
5 * Written 1997 by Alan Hourihane <alanh@fairlite.demon.co.uk>
6 * plus modifications of the 53c7xx.c driver to support the Amiga.
7 *
8 * Rewritten to use 53c700.c by Kars de Jong <jongk@linux-m68k.org>

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

32};
33
34static struct platform_device *a4000t_scsi_device;
35
36#define A4000T_SCSI_ADDR 0xdd0040
37
38static int __devinit a4000t_probe(struct device *dev)
39{
40 struct Scsi_Host * host = NULL;
40 struct Scsi_Host *host;
41 struct NCR_700_Host_Parameters *hostdata;
42
43 if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI)))
44 goto out;
45
46 if (!request_mem_region(A4000T_SCSI_ADDR, 0x1000,
47 "A4000T builtin SCSI"))
48 goto out;
49
41 struct NCR_700_Host_Parameters *hostdata;
42
43 if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI)))
44 goto out;
45
46 if (!request_mem_region(A4000T_SCSI_ADDR, 0x1000,
47 "A4000T builtin SCSI"))
48 goto out;
49
50 hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
51 if (hostdata == NULL) {
50 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
51 if (!hostdata) {
52 printk(KERN_ERR "a4000t-scsi: Failed to allocate host data\n");
53 goto out_release;
54 }
52 printk(KERN_ERR "a4000t-scsi: Failed to allocate host data\n");
53 goto out_release;
54 }
55 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
56
57 /* Fill in the required pieces of hostdata */
58 hostdata->base = (void __iomem *)ZTWO_VADDR(A4000T_SCSI_ADDR);
59 hostdata->clock = 50;
60 hostdata->chip710 = 1;
61 hostdata->dmode_extra = DMODE_FC2;
62 hostdata->dcntl_extra = EA_710;
63

--- 81 unchanged lines hidden ---
55
56 /* Fill in the required pieces of hostdata */
57 hostdata->base = (void __iomem *)ZTWO_VADDR(A4000T_SCSI_ADDR);
58 hostdata->clock = 50;
59 hostdata->chip710 = 1;
60 hostdata->dmode_extra = DMODE_FC2;
61 hostdata->dcntl_extra = EA_710;
62

--- 81 unchanged lines hidden ---