blob: d64a769b8155ccda7ab0d0368c9bb84eb717e6a6 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Generic Macintosh NCR5380 driver
3 *
4 * Copyright 1998, Michael Schmitz <mschmitz@lbl.gov>
5 *
6 * derived in part from:
7 */
8/*
9 * Generic Generic NCR5380 driver
10 *
11 * Copyright 1995, Russell King
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 */
13
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#include <linux/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/delay.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/ioport.h>
18#include <linux/init.h>
19#include <linux/blkdev.h>
20#include <linux/interrupt.h>
Finn Thaincbad48d2014-11-12 16:12:07 +110021#include <linux/platform_device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Finn Thaincbad48d2014-11-12 16:12:07 +110023#include <asm/hwtest.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#include <asm/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#include <asm/macints.h>
Finn Thaincbad48d2014-11-12 16:12:07 +110026#include <asm/setup.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#include <scsi/scsi_host.h>
Finn Thain92de3832014-11-12 16:12:04 +110029
30/* Definitions for the core NCR5380 driver. */
Boaz Harroshe744fde2007-10-16 10:25:01 +020031
Boaz Harroshe744fde2007-10-16 10:25:01 +020032#define PSEUDO_DMA
33
Finn Thaincbad48d2014-11-12 16:12:07 +110034#define NCR5380_implementation_fields unsigned char *pdma_base
Finn Thain92de3832014-11-12 16:12:04 +110035#define NCR5380_local_declare() struct Scsi_Host *_instance
36#define NCR5380_setup(instance) _instance = instance
37
38#define NCR5380_read(reg) macscsi_read(_instance, reg)
39#define NCR5380_write(reg, value) macscsi_write(_instance, reg, value)
40
41#define NCR5380_pread macscsi_pread
42#define NCR5380_pwrite macscsi_pwrite
43
44#define NCR5380_intr macscsi_intr
45#define NCR5380_queue_command macscsi_queue_command
46#define NCR5380_abort macscsi_abort
47#define NCR5380_bus_reset macscsi_bus_reset
48#define NCR5380_info macscsi_info
49#define NCR5380_show_info macscsi_show_info
50#define NCR5380_write_info macscsi_write_info
51
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#include "NCR5380.h"
53
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#define RESET_BOOT
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Linus Torvalds1da177e2005-04-16 15:20:36 -070056static int setup_can_queue = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110057module_param(setup_can_queue, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070058static int setup_cmd_per_lun = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110059module_param(setup_cmd_per_lun, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070060static int setup_sg_tablesize = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110061module_param(setup_sg_tablesize, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070062static int setup_use_pdma = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110063module_param(setup_use_pdma, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070064static int setup_use_tagged_queuing = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110065module_param(setup_use_tagged_queuing, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070066static int setup_hostid = -1;
Finn Thain6e9ae6d2014-11-12 16:12:05 +110067module_param(setup_hostid, int, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -070068
69/* Time (in jiffies) to wait after a reset; the SCSI standard calls for 250ms,
70 * we usually do 0.5s to be on the safe side. But Toshiba CD-ROMs once more
71 * need ten times the standard value... */
72#define TOSHIBA_DELAY
73
74#ifdef TOSHIBA_DELAY
75#define AFTER_RESET_DELAY (5*HZ/2)
76#else
77#define AFTER_RESET_DELAY (HZ/2)
78#endif
79
Linus Torvalds1da177e2005-04-16 15:20:36 -070080/*
81 * NCR 5380 register access functions
82 */
83
Finn Thaincbad48d2014-11-12 16:12:07 +110084static inline char macscsi_read(struct Scsi_Host *instance, int reg)
Linus Torvalds1da177e2005-04-16 15:20:36 -070085{
Finn Thaincbad48d2014-11-12 16:12:07 +110086 return in_8(instance->base + (reg << 4));
Linus Torvalds1da177e2005-04-16 15:20:36 -070087}
88
Finn Thaincbad48d2014-11-12 16:12:07 +110089static inline void macscsi_write(struct Scsi_Host *instance, int reg, int value)
Linus Torvalds1da177e2005-04-16 15:20:36 -070090{
Finn Thaincbad48d2014-11-12 16:12:07 +110091 out_8(instance->base + (reg << 4), value);
Linus Torvalds1da177e2005-04-16 15:20:36 -070092}
Linus Torvalds1da177e2005-04-16 15:20:36 -070093
Finn Thain6e9ae6d2014-11-12 16:12:05 +110094#ifndef MODULE
95static int __init mac_scsi_setup(char *str)
96{
Linus Torvalds1da177e2005-04-16 15:20:36 -070097 int ints[7];
Finn Thain6e9ae6d2014-11-12 16:12:05 +110098
99 (void)get_options(str, ARRAY_SIZE(ints), ints);
100
101 if (ints[0] < 1 || ints[0] > 6) {
102 pr_err("Usage: mac5380=<can_queue>[,<cmd_per_lun>[,<sg_tablesize>[,<hostid>[,<use_tags>[,<use_pdma>]]]]]\n");
103 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 }
Finn Thain6e9ae6d2014-11-12 16:12:05 +1100105 if (ints[0] >= 1)
106 setup_can_queue = ints[1];
107 if (ints[0] >= 2)
108 setup_cmd_per_lun = ints[2];
109 if (ints[0] >= 3)
110 setup_sg_tablesize = ints[3];
111 if (ints[0] >= 4)
112 setup_hostid = ints[4];
113 if (ints[0] >= 5)
114 setup_use_tagged_queuing = ints[5];
115 if (ints[0] >= 6)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 setup_use_pdma = ints[6];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 return 1;
118}
119
120__setup("mac5380=", mac_scsi_setup);
Finn Thain6e9ae6d2014-11-12 16:12:05 +1100121#endif /* !MODULE */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123#ifdef RESET_BOOT
124/*
125 * Our 'bus reset on boot' function
126 */
127
128static void mac_scsi_reset_boot(struct Scsi_Host *instance)
129{
130 unsigned long end;
131
132 NCR5380_local_declare();
133 NCR5380_setup(instance);
134
135 /*
136 * Do a SCSI reset to clean up the bus during initialization. No messing
137 * with the queues, interrupts, or locks necessary here.
138 */
139
140 printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." );
141
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 /* get in phase */
143 NCR5380_write( TARGET_COMMAND_REG,
144 PHASE_SR_TO_TCR( NCR5380_read(STATUS_REG) ));
145
146 /* assert RST */
147 NCR5380_write( INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_RST );
148 /* The min. reset hold time is 25us, so 40us should be enough */
149 udelay( 50 );
150 /* reset RST and interrupt */
151 NCR5380_write( INITIATOR_COMMAND_REG, ICR_BASE );
152 NCR5380_read( RESET_PARITY_INTERRUPT_REG );
153
154 for( end = jiffies + AFTER_RESET_DELAY; time_before(jiffies, end); )
155 barrier();
156
Linus Torvalds1da177e2005-04-16 15:20:36 -0700157 printk(KERN_INFO " done\n" );
158}
159#endif
160
Finn Thainffdede62014-11-12 16:12:06 +1100161#ifdef PSEUDO_DMA
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162/*
163 Pseudo-DMA: (Ove Edlund)
164 The code attempts to catch bus errors that occur if one for example
165 "trips over the cable".
166 XXX: Since bus errors in the PDMA routines never happen on my
167 computer, the bus error code is untested.
168 If the code works as intended, a bus error results in Pseudo-DMA
Finn Thain542cb452014-10-03 11:42:17 +1000169 being disabled, meaning that the driver switches to slow handshake.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170 If bus errors are NOT extremely rare, this has to be changed.
171*/
172
173#define CP_IO_TO_MEM(s,d,len) \
174__asm__ __volatile__ \
175 (" cmp.w #4,%2\n" \
176 " bls 8f\n" \
177 " move.w %1,%%d0\n" \
178 " neg.b %%d0\n" \
179 " and.w #3,%%d0\n" \
180 " sub.w %%d0,%2\n" \
181 " bra 2f\n" \
182 " 1: move.b (%0),(%1)+\n" \
183 " 2: dbf %%d0,1b\n" \
184 " move.w %2,%%d0\n" \
185 " lsr.w #5,%%d0\n" \
186 " bra 4f\n" \
187 " 3: move.l (%0),(%1)+\n" \
188 "31: move.l (%0),(%1)+\n" \
189 "32: move.l (%0),(%1)+\n" \
190 "33: move.l (%0),(%1)+\n" \
191 "34: move.l (%0),(%1)+\n" \
192 "35: move.l (%0),(%1)+\n" \
193 "36: move.l (%0),(%1)+\n" \
194 "37: move.l (%0),(%1)+\n" \
195 " 4: dbf %%d0,3b\n" \
196 " move.w %2,%%d0\n" \
197 " lsr.w #2,%%d0\n" \
198 " and.w #7,%%d0\n" \
199 " bra 6f\n" \
200 " 5: move.l (%0),(%1)+\n" \
201 " 6: dbf %%d0,5b\n" \
202 " and.w #3,%2\n" \
203 " bra 8f\n" \
204 " 7: move.b (%0),(%1)+\n" \
205 " 8: dbf %2,7b\n" \
206 " moveq.l #0, %2\n" \
207 " 9: \n" \
208 ".section .fixup,\"ax\"\n" \
209 " .even\n" \
210 "90: moveq.l #1, %2\n" \
211 " jra 9b\n" \
212 ".previous\n" \
213 ".section __ex_table,\"a\"\n" \
214 " .align 4\n" \
215 " .long 1b,90b\n" \
216 " .long 3b,90b\n" \
217 " .long 31b,90b\n" \
218 " .long 32b,90b\n" \
219 " .long 33b,90b\n" \
220 " .long 34b,90b\n" \
221 " .long 35b,90b\n" \
222 " .long 36b,90b\n" \
223 " .long 37b,90b\n" \
224 " .long 5b,90b\n" \
225 " .long 7b,90b\n" \
226 ".previous" \
227 : "=a"(s), "=a"(d), "=d"(len) \
228 : "0"(s), "1"(d), "2"(len) \
229 : "d0")
230
Finn Thainffdede62014-11-12 16:12:06 +1100231static int macscsi_pread(struct Scsi_Host *instance,
232 unsigned char *dst, int len)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233{
Finn Thaincbad48d2014-11-12 16:12:07 +1100234 struct NCR5380_hostdata *hostdata = shost_priv(instance);
Finn Thainffdede62014-11-12 16:12:06 +1100235 unsigned char *d;
236 unsigned char *s;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700237
Finn Thainffdede62014-11-12 16:12:06 +1100238 NCR5380_local_declare();
239 NCR5380_setup(instance);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700240
Finn Thaincbad48d2014-11-12 16:12:07 +1100241 s = hostdata->pdma_base + (INPUT_DATA_REG << 4);
Finn Thainffdede62014-11-12 16:12:06 +1100242 d = dst;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700243
Finn Thainffdede62014-11-12 16:12:06 +1100244 /* These conditions are derived from MacOS */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700245
Finn Thainffdede62014-11-12 16:12:06 +1100246 while (!(NCR5380_read(BUS_AND_STATUS_REG) & BASR_DRQ) &&
247 !(NCR5380_read(STATUS_REG) & SR_REQ))
248 ;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249
Finn Thainffdede62014-11-12 16:12:06 +1100250 if (!(NCR5380_read(BUS_AND_STATUS_REG) & BASR_DRQ) &&
251 (NCR5380_read(BUS_AND_STATUS_REG) & BASR_PHASE_MATCH)) {
252 pr_err("Error in macscsi_pread\n");
253 return -1;
254 }
255
256 CP_IO_TO_MEM(s, d, len);
257
258 if (len != 0) {
259 pr_notice("Bus error in macscsi_pread\n");
260 return -1;
261 }
262
263 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700264}
265
266
267#define CP_MEM_TO_IO(s,d,len) \
268__asm__ __volatile__ \
269 (" cmp.w #4,%2\n" \
270 " bls 8f\n" \
271 " move.w %0,%%d0\n" \
272 " neg.b %%d0\n" \
273 " and.w #3,%%d0\n" \
274 " sub.w %%d0,%2\n" \
275 " bra 2f\n" \
276 " 1: move.b (%0)+,(%1)\n" \
277 " 2: dbf %%d0,1b\n" \
278 " move.w %2,%%d0\n" \
279 " lsr.w #5,%%d0\n" \
280 " bra 4f\n" \
281 " 3: move.l (%0)+,(%1)\n" \
282 "31: move.l (%0)+,(%1)\n" \
283 "32: move.l (%0)+,(%1)\n" \
284 "33: move.l (%0)+,(%1)\n" \
285 "34: move.l (%0)+,(%1)\n" \
286 "35: move.l (%0)+,(%1)\n" \
287 "36: move.l (%0)+,(%1)\n" \
288 "37: move.l (%0)+,(%1)\n" \
289 " 4: dbf %%d0,3b\n" \
290 " move.w %2,%%d0\n" \
291 " lsr.w #2,%%d0\n" \
292 " and.w #7,%%d0\n" \
293 " bra 6f\n" \
294 " 5: move.l (%0)+,(%1)\n" \
295 " 6: dbf %%d0,5b\n" \
296 " and.w #3,%2\n" \
297 " bra 8f\n" \
298 " 7: move.b (%0)+,(%1)\n" \
299 " 8: dbf %2,7b\n" \
300 " moveq.l #0, %2\n" \
301 " 9: \n" \
302 ".section .fixup,\"ax\"\n" \
303 " .even\n" \
304 "90: moveq.l #1, %2\n" \
305 " jra 9b\n" \
306 ".previous\n" \
307 ".section __ex_table,\"a\"\n" \
308 " .align 4\n" \
309 " .long 1b,90b\n" \
310 " .long 3b,90b\n" \
311 " .long 31b,90b\n" \
312 " .long 32b,90b\n" \
313 " .long 33b,90b\n" \
314 " .long 34b,90b\n" \
315 " .long 35b,90b\n" \
316 " .long 36b,90b\n" \
317 " .long 37b,90b\n" \
318 " .long 5b,90b\n" \
319 " .long 7b,90b\n" \
320 ".previous" \
321 : "=a"(s), "=a"(d), "=d"(len) \
322 : "0"(s), "1"(d), "2"(len) \
323 : "d0")
324
Finn Thainffdede62014-11-12 16:12:06 +1100325static int macscsi_pwrite(struct Scsi_Host *instance,
326 unsigned char *src, int len)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327{
Finn Thaincbad48d2014-11-12 16:12:07 +1100328 struct NCR5380_hostdata *hostdata = shost_priv(instance);
Finn Thainffdede62014-11-12 16:12:06 +1100329 unsigned char *s;
330 unsigned char *d;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331
Finn Thainffdede62014-11-12 16:12:06 +1100332 NCR5380_local_declare();
333 NCR5380_setup(instance);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700334
Finn Thainffdede62014-11-12 16:12:06 +1100335 s = src;
Finn Thaincbad48d2014-11-12 16:12:07 +1100336 d = hostdata->pdma_base + (OUTPUT_DATA_REG << 4);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700337
Finn Thainffdede62014-11-12 16:12:06 +1100338 /* These conditions are derived from MacOS */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339
Finn Thainffdede62014-11-12 16:12:06 +1100340 while (!(NCR5380_read(BUS_AND_STATUS_REG) & BASR_DRQ) &&
341 (!(NCR5380_read(STATUS_REG) & SR_REQ) ||
342 (NCR5380_read(BUS_AND_STATUS_REG) & BASR_PHASE_MATCH)))
343 ;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700344
Finn Thainffdede62014-11-12 16:12:06 +1100345 if (!(NCR5380_read(BUS_AND_STATUS_REG) & BASR_DRQ)) {
346 pr_err("Error in macscsi_pwrite\n");
347 return -1;
348 }
349
350 CP_MEM_TO_IO(s, d, len);
351
352 if (len != 0) {
353 pr_notice("Bus error in macscsi_pwrite\n");
354 return -1;
355 }
356
357 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700358}
Finn Thainffdede62014-11-12 16:12:06 +1100359#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361#include "NCR5380.c"
362
Finn Thaincbad48d2014-11-12 16:12:07 +1100363#define DRV_MODULE_NAME "mac_scsi"
364#define PFX DRV_MODULE_NAME ": "
365
366static struct scsi_host_template mac_scsi_template = {
367 .module = THIS_MODULE,
368 .proc_name = DRV_MODULE_NAME,
Al Virodd7ab712013-03-31 01:15:54 -0400369 .show_info = macscsi_show_info,
370 .write_info = macscsi_write_info,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700371 .name = "Macintosh NCR5380 SCSI",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372 .info = macscsi_info,
373 .queuecommand = macscsi_queue_command,
374 .eh_abort_handler = macscsi_abort,
375 .eh_bus_reset_handler = macscsi_bus_reset,
Finn Thaind572f652014-11-12 16:12:00 +1100376 .can_queue = 16,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700377 .this_id = 7,
378 .sg_tablesize = SG_ALL,
Finn Thaind572f652014-11-12 16:12:00 +1100379 .cmd_per_lun = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700380 .use_clustering = DISABLE_CLUSTERING
381};
382
Finn Thaincbad48d2014-11-12 16:12:07 +1100383static int __init mac_scsi_probe(struct platform_device *pdev)
384{
385 struct Scsi_Host *instance;
386 int error;
387 int host_flags = 0;
388 struct resource *irq, *pio_mem, *pdma_mem = NULL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700389
Finn Thaincbad48d2014-11-12 16:12:07 +1100390 pio_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
391 if (!pio_mem)
392 return -ENODEV;
Finn Thain6e9ae6d2014-11-12 16:12:05 +1100393
Finn Thaincbad48d2014-11-12 16:12:07 +1100394#ifdef PSEUDO_DMA
395 pdma_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
396#endif
397
398 irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
399
400 if (!hwreg_present((unsigned char *)pio_mem->start +
401 (STATUS_REG << 4))) {
402 pr_info(PFX "no device detected at %pap\n", &pio_mem->start);
403 return -ENODEV;
404 }
405
406 if (setup_can_queue > 0)
407 mac_scsi_template.can_queue = setup_can_queue;
408 if (setup_cmd_per_lun > 0)
409 mac_scsi_template.cmd_per_lun = setup_cmd_per_lun;
410 if (setup_sg_tablesize >= 0)
411 mac_scsi_template.sg_tablesize = setup_sg_tablesize;
412 if (setup_hostid >= 0)
413 mac_scsi_template.this_id = setup_hostid & 7;
Finn Thaincbad48d2014-11-12 16:12:07 +1100414 if (setup_use_pdma < 0)
415 setup_use_pdma = 0;
416
417 instance = scsi_host_alloc(&mac_scsi_template,
418 sizeof(struct NCR5380_hostdata));
419 if (!instance)
420 return -ENOMEM;
421
422 instance->base = pio_mem->start;
423 if (irq)
424 instance->irq = irq->start;
425 else
426 instance->irq = NO_IRQ;
427
428 if (pdma_mem && setup_use_pdma) {
429 struct NCR5380_hostdata *hostdata = shost_priv(instance);
430
431 hostdata->pdma_base = (unsigned char *)pdma_mem->start;
432 } else
433 host_flags |= FLAG_NO_PSEUDO_DMA;
434
435#ifdef RESET_BOOT
436 mac_scsi_reset_boot(instance);
437#endif
438
Finn Thainca513fc2014-11-12 16:12:19 +1100439#ifdef SUPPORT_TAGS
440 host_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0;
441#endif
442
Finn Thaincbad48d2014-11-12 16:12:07 +1100443 NCR5380_init(instance, host_flags);
444
445 if (instance->irq != NO_IRQ) {
446 error = request_irq(instance->irq, macscsi_intr, IRQF_SHARED,
447 "NCR5380", instance);
448 if (error)
449 goto fail_irq;
450 }
451
452 error = scsi_add_host(instance, NULL);
453 if (error)
454 goto fail_host;
455
456 platform_set_drvdata(pdev, instance);
457
458 scsi_scan_host(instance);
459 return 0;
460
461fail_host:
462 if (instance->irq != NO_IRQ)
463 free_irq(instance->irq, instance);
464fail_irq:
465 NCR5380_exit(instance);
466 scsi_host_put(instance);
467 return error;
468}
469
470static int __exit mac_scsi_remove(struct platform_device *pdev)
471{
472 struct Scsi_Host *instance = platform_get_drvdata(pdev);
473
474 scsi_remove_host(instance);
475 if (instance->irq != NO_IRQ)
476 free_irq(instance->irq, instance);
477 NCR5380_exit(instance);
478 scsi_host_put(instance);
479 return 0;
480}
481
482static struct platform_driver mac_scsi_driver = {
483 .remove = __exit_p(mac_scsi_remove),
484 .driver = {
485 .name = DRV_MODULE_NAME,
Finn Thaincbad48d2014-11-12 16:12:07 +1100486 },
487};
488
489module_platform_driver_probe(mac_scsi_driver, mac_scsi_probe);
490
491MODULE_ALIAS("platform:" DRV_MODULE_NAME);
Finn Thain6e9ae6d2014-11-12 16:12:05 +1100492MODULE_LICENSE("GPL");