Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <linux/types.h> |
| 2 | #include <linux/mm.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | #include <linux/ioport.h> |
| 4 | #include <linux/init.h> |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 5 | #include <linux/slab.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | #include <linux/spinlock.h> |
| 7 | #include <linux/interrupt.h> |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 8 | #include <linux/platform_device.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <asm/page.h> |
| 11 | #include <asm/pgtable.h> |
| 12 | #include <asm/amigaints.h> |
| 13 | #include <asm/amigahw.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | #include "scsi.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include "wd33c93.h" |
| 17 | #include "a3000.h" |
| 18 | |
Adrian Bunk | 9387edb | 2009-03-04 12:06:08 -0800 | [diff] [blame] | 19 | |
Geert Uytterhoeven | a8169e6 | 2009-05-17 13:35:07 +0200 | [diff] [blame] | 20 | static irqreturn_t a3000_intr(int irq, void *data) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | { |
Geert Uytterhoeven | a8169e6 | 2009-05-17 13:35:07 +0200 | [diff] [blame] | 22 | struct Scsi_Host *instance = data; |
Geert Uytterhoeven | c57c1ca | 2009-05-17 21:05:53 +0200 | [diff] [blame] | 23 | struct a3000_scsiregs *regs = (struct a3000_scsiregs *)(instance->base); |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 24 | unsigned int status = regs->ISTR; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | unsigned long flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
| 27 | if (!(status & ISTR_INT_P)) |
| 28 | return IRQ_NONE; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 29 | if (status & ISTR_INTS) { |
Geert Uytterhoeven | a8169e6 | 2009-05-17 13:35:07 +0200 | [diff] [blame] | 30 | spin_lock_irqsave(instance->host_lock, flags); |
| 31 | wd33c93_intr(instance); |
| 32 | spin_unlock_irqrestore(instance->host_lock, flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | return IRQ_HANDLED; |
| 34 | } |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 35 | pr_warning("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | return IRQ_NONE; |
| 37 | } |
| 38 | |
Henrik Kretzschmar | 6539641 | 2006-09-12 23:49:33 +0200 | [diff] [blame] | 39 | static int dma_setup(struct scsi_cmnd *cmd, int dir_in) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | { |
Geert Uytterhoeven | a8169e6 | 2009-05-17 13:35:07 +0200 | [diff] [blame] | 41 | struct Scsi_Host *instance = cmd->device->host; |
| 42 | struct WD33C93_hostdata *hdata = shost_priv(instance); |
Geert Uytterhoeven | c57c1ca | 2009-05-17 21:05:53 +0200 | [diff] [blame] | 43 | struct a3000_scsiregs *regs = (struct a3000_scsiregs *)(instance->base); |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 44 | unsigned short cntr = CNTR_PDMD | CNTR_INTEN; |
| 45 | unsigned long addr = virt_to_bus(cmd->SCp.ptr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 47 | /* |
| 48 | * if the physical address has the wrong alignment, or if |
| 49 | * physical address is bad, or if it is a write and at the |
| 50 | * end of a physical memory chunk, then allocate a bounce |
| 51 | * buffer |
| 52 | */ |
| 53 | if (addr & A3000_XFER_MASK) { |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 54 | hdata->dma_bounce_len = (cmd->SCp.this_residual + 511) & ~0x1ff; |
| 55 | hdata->dma_bounce_buffer = kmalloc(hdata->dma_bounce_len, |
| 56 | GFP_KERNEL); |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 57 | |
| 58 | /* can't allocate memory; use PIO */ |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 59 | if (!hdata->dma_bounce_buffer) { |
| 60 | hdata->dma_bounce_len = 0; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 61 | return 1; |
| 62 | } |
| 63 | |
| 64 | if (!dir_in) { |
| 65 | /* copy to bounce buffer for a write */ |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 66 | memcpy(hdata->dma_bounce_buffer, cmd->SCp.ptr, |
| 67 | cmd->SCp.this_residual); |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 68 | } |
| 69 | |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 70 | addr = virt_to_bus(hdata->dma_bounce_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | } |
| 72 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 73 | /* setup dma direction */ |
| 74 | if (!dir_in) |
| 75 | cntr |= CNTR_DDIR; |
| 76 | |
| 77 | /* remember direction */ |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 78 | hdata->dma_dir = dir_in; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 79 | |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 80 | regs->CNTR = cntr; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 81 | |
| 82 | /* setup DMA *physical* address */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 83 | regs->ACR = addr; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 84 | |
| 85 | if (dir_in) { |
| 86 | /* invalidate any cache */ |
| 87 | cache_clear(addr, cmd->SCp.this_residual); |
| 88 | } else { |
| 89 | /* push any dirty cache */ |
| 90 | cache_push(addr, cmd->SCp.this_residual); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 93 | /* start DMA */ |
| 94 | mb(); /* make sure setup is completed */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 95 | regs->ST_DMA = 1; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 96 | mb(); /* make sure DMA has started before next IO */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 98 | /* return success */ |
| 99 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | } |
| 101 | |
Henrik Kretzschmar | 6539641 | 2006-09-12 23:49:33 +0200 | [diff] [blame] | 102 | static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, |
| 103 | int status) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | { |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 105 | struct WD33C93_hostdata *hdata = shost_priv(instance); |
Geert Uytterhoeven | c57c1ca | 2009-05-17 21:05:53 +0200 | [diff] [blame] | 106 | struct a3000_scsiregs *regs = (struct a3000_scsiregs *)(instance->base); |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 107 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 108 | /* disable SCSI interrupts */ |
| 109 | unsigned short cntr = CNTR_PDMD; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 111 | if (!hdata->dma_dir) |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 112 | cntr |= CNTR_DDIR; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 114 | regs->CNTR = cntr; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 115 | mb(); /* make sure CNTR is updated before next IO */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 117 | /* flush if we were reading */ |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 118 | if (hdata->dma_dir) { |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 119 | regs->FLUSH = 1; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 120 | mb(); /* don't allow prefetch */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 121 | while (!(regs->ISTR & ISTR_FE_FLG)) |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 122 | barrier(); |
| 123 | mb(); /* no IO until FLUSH is done */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | } |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 125 | |
| 126 | /* clear a possible interrupt */ |
| 127 | /* I think that this CINT is only necessary if you are |
| 128 | * using the terminal count features. HM 7 Mar 1994 |
| 129 | */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 130 | regs->CINT = 1; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 131 | |
| 132 | /* stop DMA */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 133 | regs->SP_DMA = 1; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 134 | mb(); /* make sure DMA is stopped before next IO */ |
| 135 | |
| 136 | /* restore the CONTROL bits (minus the direction flag) */ |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 137 | regs->CNTR = CNTR_PDMD | CNTR_INTEN; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 138 | mb(); /* make sure CNTR is updated before next IO */ |
| 139 | |
| 140 | /* copy from a bounce buffer, if necessary */ |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 141 | if (status && hdata->dma_bounce_buffer) { |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 142 | if (SCpnt) { |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 143 | if (hdata->dma_dir && SCpnt) |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 144 | memcpy(SCpnt->SCp.ptr, |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 145 | hdata->dma_bounce_buffer, |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 146 | SCpnt->SCp.this_residual); |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 147 | kfree(hdata->dma_bounce_buffer); |
| 148 | hdata->dma_bounce_buffer = NULL; |
| 149 | hdata->dma_bounce_len = 0; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 150 | } else { |
Geert Uytterhoeven | afdbbc1 | 2010-04-04 11:00:39 +0200 | [diff] [blame] | 151 | kfree(hdata->dma_bounce_buffer); |
| 152 | hdata->dma_bounce_buffer = NULL; |
| 153 | hdata->dma_bounce_len = 0; |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 154 | } |
| 155 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | } |
| 157 | |
Henrik Kretzschmar | 6539641 | 2006-09-12 23:49:33 +0200 | [diff] [blame] | 158 | static int a3000_bus_reset(struct scsi_cmnd *cmd) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | { |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 160 | struct Scsi_Host *instance = cmd->device->host; |
| 161 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | /* FIXME perform bus-specific reset */ |
Geert Uytterhoeven | 2135101 | 2010-04-04 11:00:35 +0200 | [diff] [blame] | 163 | |
Jeff Garzik | df0ae24 | 2005-05-28 07:57:14 -0400 | [diff] [blame] | 164 | /* FIXME 2: kill this entire function, which should |
| 165 | cause mid-layer to call wd33c93_host_reset anyway? */ |
Jeff Garzik | 68b3aa7 | 2005-05-28 07:56:31 -0400 | [diff] [blame] | 166 | |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 167 | spin_lock_irq(instance->host_lock); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | wd33c93_host_reset(cmd); |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 169 | spin_unlock_irq(instance->host_lock); |
Jeff Garzik | 68b3aa7 | 2005-05-28 07:56:31 -0400 | [diff] [blame] | 170 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 171 | return SUCCESS; |
| 172 | } |
| 173 | |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 174 | static struct scsi_host_template amiga_a3000_scsi_template = { |
| 175 | .module = THIS_MODULE, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | .name = "Amiga 3000 built-in SCSI", |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 177 | .proc_info = wd33c93_proc_info, |
| 178 | .proc_name = "A3000", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | .queuecommand = wd33c93_queuecommand, |
| 180 | .eh_abort_handler = wd33c93_abort, |
| 181 | .eh_bus_reset_handler = a3000_bus_reset, |
| 182 | .eh_host_reset_handler = wd33c93_host_reset, |
| 183 | .can_queue = CAN_QUEUE, |
| 184 | .this_id = 7, |
| 185 | .sg_tablesize = SG_ALL, |
| 186 | .cmd_per_lun = CMD_PER_LUN, |
| 187 | .use_clustering = ENABLE_CLUSTERING |
| 188 | }; |
| 189 | |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 190 | static int __init amiga_a3000_scsi_probe(struct platform_device *pdev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | { |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 192 | struct resource *res; |
| 193 | struct Scsi_Host *instance; |
| 194 | int error; |
| 195 | struct a3000_scsiregs *regs; |
| 196 | wd33c93_regs wdregs; |
| 197 | struct WD33C93_hostdata *hdata; |
Geert Uytterhoeven | d753722 | 2009-05-17 12:17:23 +0200 | [diff] [blame] | 198 | |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 199 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 200 | if (!res) |
| 201 | return -ENODEV; |
| 202 | |
| 203 | if (!request_mem_region(res->start, resource_size(res), "wd33c93")) |
| 204 | return -EBUSY; |
| 205 | |
| 206 | instance = scsi_host_alloc(&amiga_a3000_scsi_template, |
| 207 | sizeof(struct WD33C93_hostdata)); |
| 208 | if (!instance) { |
| 209 | error = -ENOMEM; |
| 210 | goto fail_alloc; |
| 211 | } |
| 212 | |
| 213 | instance->base = ZTWO_VADDR(res->start); |
| 214 | instance->irq = IRQ_AMIGA_PORTS; |
| 215 | |
| 216 | regs = (struct a3000_scsiregs *)(instance->base); |
| 217 | regs->DAWR = DAWR_A3000; |
| 218 | |
| 219 | wdregs.SASR = ®s->SASR; |
| 220 | wdregs.SCMD = ®s->SCMD; |
| 221 | |
| 222 | hdata = shost_priv(instance); |
| 223 | hdata->no_sync = 0xff; |
| 224 | hdata->fast = 0; |
| 225 | hdata->dma_mode = CTRL_DMA; |
| 226 | |
| 227 | wd33c93_init(instance, wdregs, dma_setup, dma_stop, WD33C93_FS_12_15); |
| 228 | error = request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, |
| 229 | "A3000 SCSI", instance); |
| 230 | if (error) |
| 231 | goto fail_irq; |
| 232 | |
| 233 | regs->CNTR = CNTR_PDMD | CNTR_INTEN; |
| 234 | |
| 235 | error = scsi_add_host(instance, NULL); |
| 236 | if (error) |
| 237 | goto fail_host; |
| 238 | |
| 239 | platform_set_drvdata(pdev, instance); |
| 240 | |
| 241 | scsi_scan_host(instance); |
| 242 | return 0; |
| 243 | |
| 244 | fail_host: |
| 245 | free_irq(IRQ_AMIGA_PORTS, instance); |
| 246 | fail_irq: |
| 247 | scsi_host_put(instance); |
| 248 | fail_alloc: |
| 249 | release_mem_region(res->start, resource_size(res)); |
| 250 | return error; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | } |
| 252 | |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 253 | static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev) |
| 254 | { |
| 255 | struct Scsi_Host *instance = platform_get_drvdata(pdev); |
| 256 | struct a3000_scsiregs *regs = (struct a3000_scsiregs *)(instance->base); |
| 257 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 258 | |
| 259 | regs->CNTR = 0; |
| 260 | scsi_remove_host(instance); |
| 261 | free_irq(IRQ_AMIGA_PORTS, instance); |
| 262 | scsi_host_put(instance); |
| 263 | release_mem_region(res->start, resource_size(res)); |
| 264 | return 0; |
| 265 | } |
| 266 | |
| 267 | static struct platform_driver amiga_a3000_scsi_driver = { |
| 268 | .remove = __exit_p(amiga_a3000_scsi_remove), |
| 269 | .driver = { |
| 270 | .name = "amiga-a3000-scsi", |
| 271 | .owner = THIS_MODULE, |
| 272 | }, |
| 273 | }; |
| 274 | |
| 275 | static int __init amiga_a3000_scsi_init(void) |
| 276 | { |
| 277 | return platform_driver_probe(&amiga_a3000_scsi_driver, |
| 278 | amiga_a3000_scsi_probe); |
| 279 | } |
| 280 | module_init(amiga_a3000_scsi_init); |
| 281 | |
| 282 | static void __exit amiga_a3000_scsi_exit(void) |
| 283 | { |
| 284 | platform_driver_unregister(&amiga_a3000_scsi_driver); |
| 285 | } |
| 286 | module_exit(amiga_a3000_scsi_exit); |
| 287 | |
| 288 | MODULE_DESCRIPTION("Amiga 3000 built-in SCSI"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | MODULE_LICENSE("GPL"); |
Geert Uytterhoeven | c2a24a4 | 2009-04-05 13:02:45 +0200 | [diff] [blame^] | 290 | MODULE_ALIAS("platform:amiga-a3000-scsi"); |