zorro7xx.c (39fe5434cb9de5da40510028b17b96bc4eb312b3) zorro7xx.c (bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022)
1/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga MacroSystemUS WarpEngine SCSI controller.
4 * Amiga Technologies/DKB A4091 SCSI controller.
5 *
6 * Written 1997 by Alan Hourihane <alanh@fairlite.demon.co.uk>
7 * plus modifications of the 53c7xx.c driver to support the Amiga.
8 *

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

64 .driver_data = (unsigned long)&zorro7xx_driver_data[3],
65 },
66 { 0 }
67};
68
69static int __devinit zorro7xx_init_one(struct zorro_dev *z,
70 const struct zorro_device_id *ent)
71{
1/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga MacroSystemUS WarpEngine SCSI controller.
4 * Amiga Technologies/DKB A4091 SCSI controller.
5 *
6 * Written 1997 by Alan Hourihane <alanh@fairlite.demon.co.uk>
7 * plus modifications of the 53c7xx.c driver to support the Amiga.
8 *

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

64 .driver_data = (unsigned long)&zorro7xx_driver_data[3],
65 },
66 { 0 }
67};
68
69static int __devinit zorro7xx_init_one(struct zorro_dev *z,
70 const struct zorro_device_id *ent)
71{
72 struct Scsi_Host * host = NULL;
72 struct Scsi_Host *host;
73 struct NCR_700_Host_Parameters *hostdata;
74 struct zorro_driver_data *zdd;
75 unsigned long board, ioaddr;
76
77 board = zorro_resource_start(z);
78 zdd = (struct zorro_driver_data *)ent->driver_data;
79
80 if (zdd->absolute) {
81 ioaddr = zdd->offset;
82 } else {
83 ioaddr = board + zdd->offset;
84 }
85
86 if (!zorro_request_device(z, zdd->name)) {
87 printk(KERN_ERR "zorro7xx: cannot reserve region 0x%lx, abort\n",
88 board);
89 return -EBUSY;
90 }
91
73 struct NCR_700_Host_Parameters *hostdata;
74 struct zorro_driver_data *zdd;
75 unsigned long board, ioaddr;
76
77 board = zorro_resource_start(z);
78 zdd = (struct zorro_driver_data *)ent->driver_data;
79
80 if (zdd->absolute) {
81 ioaddr = zdd->offset;
82 } else {
83 ioaddr = board + zdd->offset;
84 }
85
86 if (!zorro_request_device(z, zdd->name)) {
87 printk(KERN_ERR "zorro7xx: cannot reserve region 0x%lx, abort\n",
88 board);
89 return -EBUSY;
90 }
91
92 hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
93 if (hostdata == NULL) {
92 hostdata = kzalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL);
93 if (!hostdata) {
94 printk(KERN_ERR "zorro7xx: Failed to allocate host data\n");
95 goto out_release;
96 }
97
94 printk(KERN_ERR "zorro7xx: Failed to allocate host data\n");
95 goto out_release;
96 }
97
98 memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
99
100 /* Fill in the required pieces of hostdata */
101 if (ioaddr > 0x01000000)
102 hostdata->base = ioremap(ioaddr, zorro_resource_len(z));
103 else
104 hostdata->base = (void __iomem *)ZTWO_VADDR(ioaddr);
105
106 hostdata->clock = 50;
107 hostdata->chip710 = 1;

--- 74 unchanged lines hidden ---
98 /* Fill in the required pieces of hostdata */
99 if (ioaddr > 0x01000000)
100 hostdata->base = ioremap(ioaddr, zorro_resource_len(z));
101 else
102 hostdata->base = (void __iomem *)ZTWO_VADDR(ioaddr);
103
104 hostdata->clock = 50;
105 hostdata->chip710 = 1;

--- 74 unchanged lines hidden ---