Merge branch 'next/gpio-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / dma / omap-dma.c
1 /*
2  * OMAP DMAengine support
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 #include <linux/dmaengine.h>
9 #include <linux/dma-mapping.h>
10 #include <linux/err.h>
11 #include <linux/init.h>
12 #include <linux/interrupt.h>
13 #include <linux/list.h>
14 #include <linux/module.h>
15 #include <linux/omap-dma.h>
16 #include <linux/platform_device.h>
17 #include <linux/slab.h>
18 #include <linux/spinlock.h>
19
20 #include "virt-dma.h"
21
22 #include <plat-omap/dma-omap.h>
23
24 struct omap_dmadev {
25         struct dma_device ddev;
26         spinlock_t lock;
27         struct tasklet_struct task;
28         struct list_head pending;
29 };
30
31 struct omap_chan {
32         struct virt_dma_chan vc;
33         struct list_head node;
34
35         struct dma_slave_config cfg;
36         unsigned dma_sig;
37         bool cyclic;
38         bool paused;
39
40         int dma_ch;
41         struct omap_desc *desc;
42         unsigned sgidx;
43 };
44
45 struct omap_sg {
46         dma_addr_t addr;
47         uint32_t en;            /* number of elements (24-bit) */
48         uint32_t fn;            /* number of frames (16-bit) */
49 };
50
51 struct omap_desc {
52         struct virt_dma_desc vd;
53         enum dma_transfer_direction dir;
54         dma_addr_t dev_addr;
55
56         int16_t fi;             /* for OMAP_DMA_SYNC_PACKET */
57         uint8_t es;             /* OMAP_DMA_DATA_TYPE_xxx */
58         uint8_t sync_mode;      /* OMAP_DMA_SYNC_xxx */
59         uint8_t sync_type;      /* OMAP_DMA_xxx_SYNC* */
60         uint8_t periph_port;    /* Peripheral port */
61
62         unsigned sglen;
63         struct omap_sg sg[0];
64 };
65
66 static const unsigned es_bytes[] = {
67         [OMAP_DMA_DATA_TYPE_S8] = 1,
68         [OMAP_DMA_DATA_TYPE_S16] = 2,
69         [OMAP_DMA_DATA_TYPE_S32] = 4,
70 };
71
72 static inline struct omap_dmadev *to_omap_dma_dev(struct dma_device *d)
73 {
74         return container_of(d, struct omap_dmadev, ddev);
75 }
76
77 static inline struct omap_chan *to_omap_dma_chan(struct dma_chan *c)
78 {
79         return container_of(c, struct omap_chan, vc.chan);
80 }
81
82 static inline struct omap_desc *to_omap_dma_desc(struct dma_async_tx_descriptor *t)
83 {
84         return container_of(t, struct omap_desc, vd.tx);
85 }
86
87 static void omap_dma_desc_free(struct virt_dma_desc *vd)
88 {
89         kfree(container_of(vd, struct omap_desc, vd));
90 }
91
92 static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d,
93         unsigned idx)
94 {
95         struct omap_sg *sg = d->sg + idx;
96
97         if (d->dir == DMA_DEV_TO_MEM)
98                 omap_set_dma_dest_params(c->dma_ch, OMAP_DMA_PORT_EMIFF,
99                         OMAP_DMA_AMODE_POST_INC, sg->addr, 0, 0);
100         else
101                 omap_set_dma_src_params(c->dma_ch, OMAP_DMA_PORT_EMIFF,
102                         OMAP_DMA_AMODE_POST_INC, sg->addr, 0, 0);
103
104         omap_set_dma_transfer_params(c->dma_ch, d->es, sg->en, sg->fn,
105                 d->sync_mode, c->dma_sig, d->sync_type);
106
107         omap_start_dma(c->dma_ch);
108 }
109
110 static void omap_dma_start_desc(struct omap_chan *c)
111 {
112         struct virt_dma_desc *vd = vchan_next_desc(&c->vc);
113         struct omap_desc *d;
114
115         if (!vd) {
116                 c->desc = NULL;
117                 return;
118         }
119
120         list_del(&vd->node);
121
122         c->desc = d = to_omap_dma_desc(&vd->tx);
123         c->sgidx = 0;
124
125         if (d->dir == DMA_DEV_TO_MEM)
126                 omap_set_dma_src_params(c->dma_ch, d->periph_port,
127                         OMAP_DMA_AMODE_CONSTANT, d->dev_addr, 0, d->fi);
128         else
129                 omap_set_dma_dest_params(c->dma_ch, d->periph_port,
130                         OMAP_DMA_AMODE_CONSTANT, d->dev_addr, 0, d->fi);
131
132         omap_dma_start_sg(c, d, 0);
133 }
134
135 static void omap_dma_callback(int ch, u16 status, void *data)
136 {
137         struct omap_chan *c = data;
138         struct omap_desc *d;
139         unsigned long flags;
140
141         spin_lock_irqsave(&c->vc.lock, flags);
142         d = c->desc;
143         if (d) {
144                 if (!c->cyclic) {
145                         if (++c->sgidx < d->sglen) {
146                                 omap_dma_start_sg(c, d, c->sgidx);
147                         } else {
148                                 omap_dma_start_desc(c);
149                                 vchan_cookie_complete(&d->vd);
150                         }
151                 } else {
152                         vchan_cyclic_callback(&d->vd);
153                 }
154         }
155         spin_unlock_irqrestore(&c->vc.lock, flags);
156 }
157
158 /*
159  * This callback schedules all pending channels.  We could be more
160  * clever here by postponing allocation of the real DMA channels to
161  * this point, and freeing them when our virtual channel becomes idle.
162  *
163  * We would then need to deal with 'all channels in-use'
164  */
165 static void omap_dma_sched(unsigned long data)
166 {
167         struct omap_dmadev *d = (struct omap_dmadev *)data;
168         LIST_HEAD(head);
169
170         spin_lock_irq(&d->lock);
171         list_splice_tail_init(&d->pending, &head);
172         spin_unlock_irq(&d->lock);
173
174         while (!list_empty(&head)) {
175                 struct omap_chan *c = list_first_entry(&head,
176                         struct omap_chan, node);
177
178                 spin_lock_irq(&c->vc.lock);
179                 list_del_init(&c->node);
180                 omap_dma_start_desc(c);
181                 spin_unlock_irq(&c->vc.lock);
182         }
183 }
184
185 static int omap_dma_alloc_chan_resources(struct dma_chan *chan)
186 {
187         struct omap_chan *c = to_omap_dma_chan(chan);
188
189         dev_info(c->vc.chan.device->dev, "allocating channel for %u\n", c->dma_sig);
190
191         return omap_request_dma(c->dma_sig, "DMA engine",
192                 omap_dma_callback, c, &c->dma_ch);
193 }
194
195 static void omap_dma_free_chan_resources(struct dma_chan *chan)
196 {
197         struct omap_chan *c = to_omap_dma_chan(chan);
198
199         vchan_free_chan_resources(&c->vc);
200         omap_free_dma(c->dma_ch);
201
202         dev_info(c->vc.chan.device->dev, "freeing channel for %u\n", c->dma_sig);
203 }
204
205 static size_t omap_dma_sg_size(struct omap_sg *sg)
206 {
207         return sg->en * sg->fn;
208 }
209
210 static size_t omap_dma_desc_size(struct omap_desc *d)
211 {
212         unsigned i;
213         size_t size;
214
215         for (size = i = 0; i < d->sglen; i++)
216                 size += omap_dma_sg_size(&d->sg[i]);
217
218         return size * es_bytes[d->es];
219 }
220
221 static size_t omap_dma_desc_size_pos(struct omap_desc *d, dma_addr_t addr)
222 {
223         unsigned i;
224         size_t size, es_size = es_bytes[d->es];
225
226         for (size = i = 0; i < d->sglen; i++) {
227                 size_t this_size = omap_dma_sg_size(&d->sg[i]) * es_size;
228
229                 if (size)
230                         size += this_size;
231                 else if (addr >= d->sg[i].addr &&
232                          addr < d->sg[i].addr + this_size)
233                         size += d->sg[i].addr + this_size - addr;
234         }
235         return size;
236 }
237
238 static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
239         dma_cookie_t cookie, struct dma_tx_state *txstate)
240 {
241         struct omap_chan *c = to_omap_dma_chan(chan);
242         struct virt_dma_desc *vd;
243         enum dma_status ret;
244         unsigned long flags;
245
246         ret = dma_cookie_status(chan, cookie, txstate);
247         if (ret == DMA_SUCCESS || !txstate)
248                 return ret;
249
250         spin_lock_irqsave(&c->vc.lock, flags);
251         vd = vchan_find_desc(&c->vc, cookie);
252         if (vd) {
253                 txstate->residue = omap_dma_desc_size(to_omap_dma_desc(&vd->tx));
254         } else if (c->desc && c->desc->vd.tx.cookie == cookie) {
255                 struct omap_desc *d = c->desc;
256                 dma_addr_t pos;
257
258                 if (d->dir == DMA_MEM_TO_DEV)
259                         pos = omap_get_dma_src_pos(c->dma_ch);
260                 else if (d->dir == DMA_DEV_TO_MEM)
261                         pos = omap_get_dma_dst_pos(c->dma_ch);
262                 else
263                         pos = 0;
264
265                 txstate->residue = omap_dma_desc_size_pos(d, pos);
266         } else {
267                 txstate->residue = 0;
268         }
269         spin_unlock_irqrestore(&c->vc.lock, flags);
270
271         return ret;
272 }
273
274 static void omap_dma_issue_pending(struct dma_chan *chan)
275 {
276         struct omap_chan *c = to_omap_dma_chan(chan);
277         unsigned long flags;
278
279         spin_lock_irqsave(&c->vc.lock, flags);
280         if (vchan_issue_pending(&c->vc) && !c->desc) {
281                 struct omap_dmadev *d = to_omap_dma_dev(chan->device);
282                 spin_lock(&d->lock);
283                 if (list_empty(&c->node))
284                         list_add_tail(&c->node, &d->pending);
285                 spin_unlock(&d->lock);
286                 tasklet_schedule(&d->task);
287         }
288         spin_unlock_irqrestore(&c->vc.lock, flags);
289 }
290
291 static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
292         struct dma_chan *chan, struct scatterlist *sgl, unsigned sglen,
293         enum dma_transfer_direction dir, unsigned long tx_flags, void *context)
294 {
295         struct omap_chan *c = to_omap_dma_chan(chan);
296         enum dma_slave_buswidth dev_width;
297         struct scatterlist *sgent;
298         struct omap_desc *d;
299         dma_addr_t dev_addr;
300         unsigned i, j = 0, es, en, frame_bytes, sync_type;
301         u32 burst;
302
303         if (dir == DMA_DEV_TO_MEM) {
304                 dev_addr = c->cfg.src_addr;
305                 dev_width = c->cfg.src_addr_width;
306                 burst = c->cfg.src_maxburst;
307                 sync_type = OMAP_DMA_SRC_SYNC;
308         } else if (dir == DMA_MEM_TO_DEV) {
309                 dev_addr = c->cfg.dst_addr;
310                 dev_width = c->cfg.dst_addr_width;
311                 burst = c->cfg.dst_maxburst;
312                 sync_type = OMAP_DMA_DST_SYNC;
313         } else {
314                 dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
315                 return NULL;
316         }
317
318         /* Bus width translates to the element size (ES) */
319         switch (dev_width) {
320         case DMA_SLAVE_BUSWIDTH_1_BYTE:
321                 es = OMAP_DMA_DATA_TYPE_S8;
322                 break;
323         case DMA_SLAVE_BUSWIDTH_2_BYTES:
324                 es = OMAP_DMA_DATA_TYPE_S16;
325                 break;
326         case DMA_SLAVE_BUSWIDTH_4_BYTES:
327                 es = OMAP_DMA_DATA_TYPE_S32;
328                 break;
329         default: /* not reached */
330                 return NULL;
331         }
332
333         /* Now allocate and setup the descriptor. */
334         d = kzalloc(sizeof(*d) + sglen * sizeof(d->sg[0]), GFP_ATOMIC);
335         if (!d)
336                 return NULL;
337
338         d->dir = dir;
339         d->dev_addr = dev_addr;
340         d->es = es;
341         d->sync_mode = OMAP_DMA_SYNC_FRAME;
342         d->sync_type = sync_type;
343         d->periph_port = OMAP_DMA_PORT_TIPB;
344
345         /*
346          * Build our scatterlist entries: each contains the address,
347          * the number of elements (EN) in each frame, and the number of
348          * frames (FN).  Number of bytes for this entry = ES * EN * FN.
349          *
350          * Burst size translates to number of elements with frame sync.
351          * Note: DMA engine defines burst to be the number of dev-width
352          * transfers.
353          */
354         en = burst;
355         frame_bytes = es_bytes[es] * en;
356         for_each_sg(sgl, sgent, sglen, i) {
357                 d->sg[j].addr = sg_dma_address(sgent);
358                 d->sg[j].en = en;
359                 d->sg[j].fn = sg_dma_len(sgent) / frame_bytes;
360                 j++;
361         }
362
363         d->sglen = j;
364
365         return vchan_tx_prep(&c->vc, &d->vd, tx_flags);
366 }
367
368 static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
369         struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
370         size_t period_len, enum dma_transfer_direction dir, unsigned long flags,
371         void *context)
372 {
373         struct omap_chan *c = to_omap_dma_chan(chan);
374         enum dma_slave_buswidth dev_width;
375         struct omap_desc *d;
376         dma_addr_t dev_addr;
377         unsigned es, sync_type;
378         u32 burst;
379
380         if (dir == DMA_DEV_TO_MEM) {
381                 dev_addr = c->cfg.src_addr;
382                 dev_width = c->cfg.src_addr_width;
383                 burst = c->cfg.src_maxburst;
384                 sync_type = OMAP_DMA_SRC_SYNC;
385         } else if (dir == DMA_MEM_TO_DEV) {
386                 dev_addr = c->cfg.dst_addr;
387                 dev_width = c->cfg.dst_addr_width;
388                 burst = c->cfg.dst_maxburst;
389                 sync_type = OMAP_DMA_DST_SYNC;
390         } else {
391                 dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
392                 return NULL;
393         }
394
395         /* Bus width translates to the element size (ES) */
396         switch (dev_width) {
397         case DMA_SLAVE_BUSWIDTH_1_BYTE:
398                 es = OMAP_DMA_DATA_TYPE_S8;
399                 break;
400         case DMA_SLAVE_BUSWIDTH_2_BYTES:
401                 es = OMAP_DMA_DATA_TYPE_S16;
402                 break;
403         case DMA_SLAVE_BUSWIDTH_4_BYTES:
404                 es = OMAP_DMA_DATA_TYPE_S32;
405                 break;
406         default: /* not reached */
407                 return NULL;
408         }
409
410         /* Now allocate and setup the descriptor. */
411         d = kzalloc(sizeof(*d) + sizeof(d->sg[0]), GFP_ATOMIC);
412         if (!d)
413                 return NULL;
414
415         d->dir = dir;
416         d->dev_addr = dev_addr;
417         d->fi = burst;
418         d->es = es;
419         if (burst)
420                 d->sync_mode = OMAP_DMA_SYNC_PACKET;
421         else
422                 d->sync_mode = OMAP_DMA_SYNC_ELEMENT;
423         d->sync_type = sync_type;
424         d->periph_port = OMAP_DMA_PORT_MPUI;
425         d->sg[0].addr = buf_addr;
426         d->sg[0].en = period_len / es_bytes[es];
427         d->sg[0].fn = buf_len / period_len;
428         d->sglen = 1;
429
430         if (!c->cyclic) {
431                 c->cyclic = true;
432                 omap_dma_link_lch(c->dma_ch, c->dma_ch);
433
434                 if (flags & DMA_PREP_INTERRUPT)
435                         omap_enable_dma_irq(c->dma_ch, OMAP_DMA_FRAME_IRQ);
436
437                 omap_disable_dma_irq(c->dma_ch, OMAP_DMA_BLOCK_IRQ);
438         }
439
440         if (dma_omap2plus()) {
441                 omap_set_dma_src_burst_mode(c->dma_ch, OMAP_DMA_DATA_BURST_16);
442                 omap_set_dma_dest_burst_mode(c->dma_ch, OMAP_DMA_DATA_BURST_16);
443         }
444
445         return vchan_tx_prep(&c->vc, &d->vd, flags);
446 }
447
448 static int omap_dma_slave_config(struct omap_chan *c, struct dma_slave_config *cfg)
449 {
450         if (cfg->src_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES ||
451             cfg->dst_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES)
452                 return -EINVAL;
453
454         memcpy(&c->cfg, cfg, sizeof(c->cfg));
455
456         return 0;
457 }
458
459 static int omap_dma_terminate_all(struct omap_chan *c)
460 {
461         struct omap_dmadev *d = to_omap_dma_dev(c->vc.chan.device);
462         unsigned long flags;
463         LIST_HEAD(head);
464
465         spin_lock_irqsave(&c->vc.lock, flags);
466
467         /* Prevent this channel being scheduled */
468         spin_lock(&d->lock);
469         list_del_init(&c->node);
470         spin_unlock(&d->lock);
471
472         /*
473          * Stop DMA activity: we assume the callback will not be called
474          * after omap_stop_dma() returns (even if it does, it will see
475          * c->desc is NULL and exit.)
476          */
477         if (c->desc) {
478                 c->desc = NULL;
479                 /* Avoid stopping the dma twice */
480                 if (!c->paused)
481                         omap_stop_dma(c->dma_ch);
482         }
483
484         if (c->cyclic) {
485                 c->cyclic = false;
486                 c->paused = false;
487                 omap_dma_unlink_lch(c->dma_ch, c->dma_ch);
488         }
489
490         vchan_get_all_descriptors(&c->vc, &head);
491         spin_unlock_irqrestore(&c->vc.lock, flags);
492         vchan_dma_desc_free_list(&c->vc, &head);
493
494         return 0;
495 }
496
497 static int omap_dma_pause(struct omap_chan *c)
498 {
499         /* Pause/Resume only allowed with cyclic mode */
500         if (!c->cyclic)
501                 return -EINVAL;
502
503         if (!c->paused) {
504                 omap_stop_dma(c->dma_ch);
505                 c->paused = true;
506         }
507
508         return 0;
509 }
510
511 static int omap_dma_resume(struct omap_chan *c)
512 {
513         /* Pause/Resume only allowed with cyclic mode */
514         if (!c->cyclic)
515                 return -EINVAL;
516
517         if (c->paused) {
518                 omap_start_dma(c->dma_ch);
519                 c->paused = false;
520         }
521
522         return 0;
523 }
524
525 static int omap_dma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
526         unsigned long arg)
527 {
528         struct omap_chan *c = to_omap_dma_chan(chan);
529         int ret;
530
531         switch (cmd) {
532         case DMA_SLAVE_CONFIG:
533                 ret = omap_dma_slave_config(c, (struct dma_slave_config *)arg);
534                 break;
535
536         case DMA_TERMINATE_ALL:
537                 ret = omap_dma_terminate_all(c);
538                 break;
539
540         case DMA_PAUSE:
541                 ret = omap_dma_pause(c);
542                 break;
543
544         case DMA_RESUME:
545                 ret = omap_dma_resume(c);
546                 break;
547
548         default:
549                 ret = -ENXIO;
550                 break;
551         }
552
553         return ret;
554 }
555
556 static int omap_dma_chan_init(struct omap_dmadev *od, int dma_sig)
557 {
558         struct omap_chan *c;
559
560         c = kzalloc(sizeof(*c), GFP_KERNEL);
561         if (!c)
562                 return -ENOMEM;
563
564         c->dma_sig = dma_sig;
565         c->vc.desc_free = omap_dma_desc_free;
566         vchan_init(&c->vc, &od->ddev);
567         INIT_LIST_HEAD(&c->node);
568
569         od->ddev.chancnt++;
570
571         return 0;
572 }
573
574 static void omap_dma_free(struct omap_dmadev *od)
575 {
576         tasklet_kill(&od->task);
577         while (!list_empty(&od->ddev.channels)) {
578                 struct omap_chan *c = list_first_entry(&od->ddev.channels,
579                         struct omap_chan, vc.chan.device_node);
580
581                 list_del(&c->vc.chan.device_node);
582                 tasklet_kill(&c->vc.task);
583                 kfree(c);
584         }
585         kfree(od);
586 }
587
588 static int omap_dma_probe(struct platform_device *pdev)
589 {
590         struct omap_dmadev *od;
591         int rc, i;
592
593         od = kzalloc(sizeof(*od), GFP_KERNEL);
594         if (!od)
595                 return -ENOMEM;
596
597         dma_cap_set(DMA_SLAVE, od->ddev.cap_mask);
598         dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask);
599         od->ddev.device_alloc_chan_resources = omap_dma_alloc_chan_resources;
600         od->ddev.device_free_chan_resources = omap_dma_free_chan_resources;
601         od->ddev.device_tx_status = omap_dma_tx_status;
602         od->ddev.device_issue_pending = omap_dma_issue_pending;
603         od->ddev.device_prep_slave_sg = omap_dma_prep_slave_sg;
604         od->ddev.device_prep_dma_cyclic = omap_dma_prep_dma_cyclic;
605         od->ddev.device_control = omap_dma_control;
606         od->ddev.dev = &pdev->dev;
607         INIT_LIST_HEAD(&od->ddev.channels);
608         INIT_LIST_HEAD(&od->pending);
609         spin_lock_init(&od->lock);
610
611         tasklet_init(&od->task, omap_dma_sched, (unsigned long)od);
612
613         for (i = 0; i < 127; i++) {
614                 rc = omap_dma_chan_init(od, i);
615                 if (rc) {
616                         omap_dma_free(od);
617                         return rc;
618                 }
619         }
620
621         rc = dma_async_device_register(&od->ddev);
622         if (rc) {
623                 pr_warn("OMAP-DMA: failed to register slave DMA engine device: %d\n",
624                         rc);
625                 omap_dma_free(od);
626         } else {
627                 platform_set_drvdata(pdev, od);
628         }
629
630         dev_info(&pdev->dev, "OMAP DMA engine driver\n");
631
632         return rc;
633 }
634
635 static int omap_dma_remove(struct platform_device *pdev)
636 {
637         struct omap_dmadev *od = platform_get_drvdata(pdev);
638
639         dma_async_device_unregister(&od->ddev);
640         omap_dma_free(od);
641
642         return 0;
643 }
644
645 static struct platform_driver omap_dma_driver = {
646         .probe  = omap_dma_probe,
647         .remove = omap_dma_remove,
648         .driver = {
649                 .name = "omap-dma-engine",
650                 .owner = THIS_MODULE,
651         },
652 };
653
654 bool omap_dma_filter_fn(struct dma_chan *chan, void *param)
655 {
656         if (chan->device->dev->driver == &omap_dma_driver.driver) {
657                 struct omap_chan *c = to_omap_dma_chan(chan);
658                 unsigned req = *(unsigned *)param;
659
660                 return req == c->dma_sig;
661         }
662         return false;
663 }
664 EXPORT_SYMBOL_GPL(omap_dma_filter_fn);
665
666 static struct platform_device *pdev;
667
668 static const struct platform_device_info omap_dma_dev_info = {
669         .name = "omap-dma-engine",
670         .id = -1,
671         .dma_mask = DMA_BIT_MASK(32),
672 };
673
674 static int omap_dma_init(void)
675 {
676         int rc = platform_driver_register(&omap_dma_driver);
677
678         if (rc == 0) {
679                 pdev = platform_device_register_full(&omap_dma_dev_info);
680                 if (IS_ERR(pdev)) {
681                         platform_driver_unregister(&omap_dma_driver);
682                         rc = PTR_ERR(pdev);
683                 }
684         }
685         return rc;
686 }
687 subsys_initcall(omap_dma_init);
688
689 static void __exit omap_dma_exit(void)
690 {
691         platform_device_unregister(pdev);
692         platform_driver_unregister(&omap_dma_driver);
693 }
694 module_exit(omap_dma_exit);
695
696 MODULE_AUTHOR("Russell King");
697 MODULE_LICENSE("GPL");