2 * linux/arch/arm/omap/dma.c
4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
6 * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com>
8 * Support functions for the OMAP internal DMA channels.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/sched.h>
19 #include <linux/spinlock.h>
20 #include <linux/errno.h>
21 #include <linux/interrupt.h>
23 #include <asm/system.h>
25 #include <asm/hardware.h>
29 #define OMAP_DMA_ACTIVE 0x01
31 #define OMAP_DMA_CCR_EN (1 << 7)
33 #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
35 static int enable_1510_mode = 0;
43 void (* callback)(int lch, u16 ch_status, void *data);
48 static int dma_chan_count;
50 static spinlock_t dma_chan_lock;
51 static struct omap_dma_lch dma_chan[OMAP_LOGICAL_DMA_CH_COUNT];
53 const static u8 dma_irq[OMAP_LOGICAL_DMA_CH_COUNT] = {
54 INT_DMA_CH0_6, INT_DMA_CH1_7, INT_DMA_CH2_8, INT_DMA_CH3,
55 INT_DMA_CH4, INT_DMA_CH5, INT_1610_DMA_CH6, INT_1610_DMA_CH7,
56 INT_1610_DMA_CH8, INT_1610_DMA_CH9, INT_1610_DMA_CH10,
57 INT_1610_DMA_CH11, INT_1610_DMA_CH12, INT_1610_DMA_CH13,
58 INT_1610_DMA_CH14, INT_1610_DMA_CH15, INT_DMA_LCD
61 static inline int get_gdma_dev(int req)
63 u32 reg = OMAP_FUNC_MUX_ARM_BASE + ((req - 1) / 5) * 4;
64 int shift = ((req - 1) % 5) * 6;
66 return ((omap_readl(reg) >> shift) & 0x3f) + 1;
69 static inline void set_gdma_dev(int req, int dev)
71 u32 reg = OMAP_FUNC_MUX_ARM_BASE + ((req - 1) / 5) * 4;
72 int shift = ((req - 1) % 5) * 6;
76 l &= ~(0x3f << shift);
77 l |= (dev - 1) << shift;
81 static void clear_lch_regs(int lch)
84 u32 lch_base = OMAP_DMA_BASE + lch * 0x40;
86 for (i = 0; i < 0x2c; i += 2)
87 omap_writew(0, lch_base + i);
90 void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
91 int frame_count, int sync_mode)
95 w = omap_readw(OMAP_DMA_CSDP(lch));
98 omap_writew(w, OMAP_DMA_CSDP(lch));
100 w = omap_readw(OMAP_DMA_CCR(lch));
102 if (sync_mode == OMAP_DMA_SYNC_FRAME)
104 omap_writew(w, OMAP_DMA_CCR(lch));
106 w = omap_readw(OMAP_DMA_CCR2(lch));
108 if (sync_mode == OMAP_DMA_SYNC_BLOCK)
110 omap_writew(w, OMAP_DMA_CCR2(lch));
112 omap_writew(elem_count, OMAP_DMA_CEN(lch));
113 omap_writew(frame_count, OMAP_DMA_CFN(lch));
116 void omap_set_dma_constant_fill(int lch, u32 color)
120 #ifdef CONFIG_DEBUG_KERNEL
121 if (omap_dma_in_1510_mode()) {
122 printk(KERN_ERR "OMAP DMA constant fill not available in 1510 mode.");
127 w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03;
129 omap_writew(w, OMAP_DMA_CCR2(lch));
131 omap_writew((u16)color, OMAP_DMA_COLOR_L(lch));
132 omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch));
134 w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f;
135 w |= 1; /* Channel type G */
136 omap_writew(w, OMAP_DMA_LCH_CTRL(lch));
139 void omap_set_dma_transparent_copy(int lch, u32 color)
143 #ifdef CONFIG_DEBUG_KERNEL
144 if (omap_dma_in_1510_mode()) {
145 printk(KERN_ERR "OMAP DMA transparent copy not available in 1510 mode.");
149 w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03;
151 omap_writew(w, OMAP_DMA_CCR2(lch));
153 omap_writew((u16)color, OMAP_DMA_COLOR_L(lch));
154 omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch));
156 w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f;
157 w |= 1; /* Channel type G */
158 omap_writew(w, OMAP_DMA_LCH_CTRL(lch));
161 void omap_set_dma_src_params(int lch, int src_port, int src_amode,
162 unsigned long src_start)
166 w = omap_readw(OMAP_DMA_CSDP(lch));
169 omap_writew(w, OMAP_DMA_CSDP(lch));
171 w = omap_readw(OMAP_DMA_CCR(lch));
173 w |= src_amode << 12;
174 omap_writew(w, OMAP_DMA_CCR(lch));
176 omap_writew(src_start >> 16, OMAP_DMA_CSSA_U(lch));
177 omap_writew(src_start, OMAP_DMA_CSSA_L(lch));
180 void omap_set_dma_src_index(int lch, int eidx, int fidx)
182 omap_writew(eidx, OMAP_DMA_CSEI(lch));
183 omap_writew(fidx, OMAP_DMA_CSFI(lch));
186 void omap_set_dma_src_data_pack(int lch, int enable)
190 w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(1 << 6);
191 w |= enable ? (1 << 6) : 0;
192 omap_writew(w, OMAP_DMA_CSDP(lch));
195 void omap_set_dma_src_burst_mode(int lch, int burst_mode)
199 w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(0x03 << 7);
200 switch (burst_mode) {
201 case OMAP_DMA_DATA_BURST_4:
204 case OMAP_DMA_DATA_BURST_8:
208 printk(KERN_ERR "Invalid DMA burst mode\n");
212 omap_writew(w, OMAP_DMA_CSDP(lch));
215 void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
216 unsigned long dest_start)
220 w = omap_readw(OMAP_DMA_CSDP(lch));
223 omap_writew(w, OMAP_DMA_CSDP(lch));
225 w = omap_readw(OMAP_DMA_CCR(lch));
227 w |= dest_amode << 14;
228 omap_writew(w, OMAP_DMA_CCR(lch));
230 omap_writew(dest_start >> 16, OMAP_DMA_CDSA_U(lch));
231 omap_writew(dest_start, OMAP_DMA_CDSA_L(lch));
234 void omap_set_dma_dest_index(int lch, int eidx, int fidx)
236 omap_writew(eidx, OMAP_DMA_CDEI(lch));
237 omap_writew(fidx, OMAP_DMA_CDFI(lch));
240 void omap_set_dma_dest_data_pack(int lch, int enable)
244 w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(1 << 13);
245 w |= enable ? (1 << 13) : 0;
246 omap_writew(w, OMAP_DMA_CSDP(lch));
249 void omap_set_dma_dest_burst_mode(int lch, int burst_mode)
253 w = omap_readw(OMAP_DMA_CSDP(lch)) & ~(0x03 << 14);
254 switch (burst_mode) {
255 case OMAP_DMA_DATA_BURST_4:
258 case OMAP_DMA_DATA_BURST_8:
262 printk(KERN_ERR "Invalid DMA burst mode\n");
266 omap_writew(w, OMAP_DMA_CSDP(lch));
269 static inline void init_intr(int lch)
273 /* Read CSR to make sure it's cleared. */
274 w = omap_readw(OMAP_DMA_CSR(lch));
275 /* Enable some nice interrupts. */
276 omap_writew(dma_chan[lch].enabled_irqs, OMAP_DMA_CICR(lch));
277 dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
280 static inline void enable_lnk(int lch)
284 /* Clear the STOP_LNK bits */
285 w = omap_readw(OMAP_DMA_CLNK_CTRL(lch));
287 omap_writew(w, OMAP_DMA_CLNK_CTRL(lch));
289 /* And set the ENABLE_LNK bits */
290 if (dma_chan[lch].next_lch != -1)
291 omap_writew(dma_chan[lch].next_lch | (1 << 15),
292 OMAP_DMA_CLNK_CTRL(lch));
295 static inline void disable_lnk(int lch)
299 /* Disable interrupts */
300 omap_writew(0, OMAP_DMA_CICR(lch));
302 /* Set the STOP_LNK bit */
303 w = omap_readw(OMAP_DMA_CLNK_CTRL(lch));
305 w = omap_writew(w, OMAP_DMA_CLNK_CTRL(lch));
307 dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
310 void omap_start_dma(int lch)
314 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
315 int next_lch, cur_lch;
316 char dma_chan_link_map[OMAP_LOGICAL_DMA_CH_COUNT];
318 dma_chan_link_map[lch] = 1;
319 /* Set the link register of the first channel */
322 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
323 cur_lch = dma_chan[lch].next_lch;
325 next_lch = dma_chan[cur_lch].next_lch;
327 /* The loop case: we've been here already */
328 if (dma_chan_link_map[cur_lch])
330 /* Mark the current channel */
331 dma_chan_link_map[cur_lch] = 1;
337 } while (next_lch != -1);
342 w = omap_readw(OMAP_DMA_CCR(lch));
343 w |= OMAP_DMA_CCR_EN;
344 omap_writew(w, OMAP_DMA_CCR(lch));
345 dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
348 void omap_stop_dma(int lch)
352 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
353 int next_lch, cur_lch = lch;
354 char dma_chan_link_map[OMAP_LOGICAL_DMA_CH_COUNT];
356 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
358 /* The loop case: we've been here already */
359 if (dma_chan_link_map[cur_lch])
361 /* Mark the current channel */
362 dma_chan_link_map[cur_lch] = 1;
364 disable_lnk(cur_lch);
366 next_lch = dma_chan[cur_lch].next_lch;
368 } while (next_lch != -1);
372 /* Disable all interrupts on the channel */
373 omap_writew(0, OMAP_DMA_CICR(lch));
375 w = omap_readw(OMAP_DMA_CCR(lch));
376 w &= ~OMAP_DMA_CCR_EN;
377 omap_writew(w, OMAP_DMA_CCR(lch));
378 dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
381 void omap_enable_dma_irq(int lch, u16 bits)
383 dma_chan[lch].enabled_irqs |= bits;
386 void omap_disable_dma_irq(int lch, u16 bits)
388 dma_chan[lch].enabled_irqs &= ~bits;
391 static int dma_handle_ch(int ch)
395 if (enable_1510_mode && ch >= 6) {
396 csr = dma_chan[ch].saved_csr;
397 dma_chan[ch].saved_csr = 0;
399 csr = omap_readw(OMAP_DMA_CSR(ch));
400 if (enable_1510_mode && ch <= 2 && (csr >> 7) != 0) {
401 dma_chan[ch + 6].saved_csr = csr >> 7;
406 if (unlikely(dma_chan[ch].dev_id == -1)) {
407 printk(KERN_WARNING "Spurious interrupt from DMA channel %d (CSR %04x)\n",
411 if (unlikely(csr & OMAP_DMA_TOUT_IRQ))
412 printk(KERN_WARNING "DMA timeout with device %d\n", dma_chan[ch].dev_id);
413 if (unlikely(csr & OMAP_DMA_DROP_IRQ))
414 printk(KERN_WARNING "DMA synchronization event drop occurred with device %d\n",
415 dma_chan[ch].dev_id);
416 if (likely(csr & OMAP_DMA_BLOCK_IRQ))
417 dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE;
418 if (likely(dma_chan[ch].callback != NULL))
419 dma_chan[ch].callback(ch, csr, dma_chan[ch].data);
423 static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
425 int ch = ((int) dev_id) - 1;
431 handled_now += dma_handle_ch(ch);
432 if (enable_1510_mode && dma_chan[ch + 6].saved_csr)
433 handled_now += dma_handle_ch(ch + 6);
436 handled += handled_now;
439 return handled ? IRQ_HANDLED : IRQ_NONE;
442 int omap_request_dma(int dev_id, const char *dev_name,
443 void (* callback)(int lch, u16 ch_status, void *data),
444 void *data, int *dma_ch_out)
446 int ch, free_ch = -1;
448 struct omap_dma_lch *chan;
450 spin_lock_irqsave(&dma_chan_lock, flags);
451 for (ch = 0; ch < dma_chan_count; ch++) {
452 if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
457 if (dev_id != 0 && dma_chan[ch].dev_id == dev_id) {
458 spin_unlock_irqrestore(&dma_chan_lock, flags);
463 spin_unlock_irqrestore(&dma_chan_lock, flags);
466 chan = dma_chan + free_ch;
467 chan->dev_id = dev_id;
468 clear_lch_regs(free_ch);
469 spin_unlock_irqrestore(&dma_chan_lock, flags);
471 chan->dev_id = dev_id;
472 chan->dev_name = dev_name;
473 chan->callback = callback;
475 chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;
477 if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap730() || cpu_is_omap1710()) {
478 /* If the sync device is set, configure it dynamically. */
480 set_gdma_dev(free_ch + 1, dev_id);
481 dev_id = free_ch + 1;
483 /* Disable the 1510 compatibility mode and set the sync device
485 omap_writew(dev_id | (1 << 10), OMAP_DMA_CCR(free_ch));
487 omap_writew(dev_id, OMAP_DMA_CCR(free_ch));
489 *dma_ch_out = free_ch;
494 void omap_free_dma(int ch)
498 spin_lock_irqsave(&dma_chan_lock, flags);
499 if (dma_chan[ch].dev_id == -1) {
500 printk("omap_dma: trying to free nonallocated DMA channel %d\n", ch);
501 spin_unlock_irqrestore(&dma_chan_lock, flags);
504 dma_chan[ch].dev_id = -1;
505 spin_unlock_irqrestore(&dma_chan_lock, flags);
507 /* Disable all DMA interrupts for the channel. */
508 omap_writew(0, OMAP_DMA_CICR(ch));
509 /* Make sure the DMA transfer is stopped. */
510 omap_writew(0, OMAP_DMA_CCR(ch));
513 int omap_dma_in_1510_mode(void)
515 return enable_1510_mode;
519 * lch_queue DMA will start right after lch_head one is finished.
520 * For this DMA link to start, you still need to start (see omap_start_dma)
521 * the first one. That will fire up the entire queue.
523 void omap_dma_link_lch (int lch_head, int lch_queue)
525 if (omap_dma_in_1510_mode()) {
526 printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
531 if ((dma_chan[lch_head].dev_id == -1) ||
532 (dma_chan[lch_queue].dev_id == -1)) {
533 printk(KERN_ERR "omap_dma: trying to link non requested channels\n");
537 dma_chan[lch_head].next_lch = lch_queue;
541 * Once the DMA queue is stopped, we can destroy it.
543 void omap_dma_unlink_lch (int lch_head, int lch_queue)
545 if (omap_dma_in_1510_mode()) {
546 printk(KERN_ERR "DMA linking is not supported in 1510 mode\n");
551 if (dma_chan[lch_head].next_lch != lch_queue ||
552 dma_chan[lch_head].next_lch == -1) {
553 printk(KERN_ERR "omap_dma: trying to unlink non linked channels\n");
558 if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) ||
559 (dma_chan[lch_head].flags & OMAP_DMA_ACTIVE)) {
560 printk(KERN_ERR "omap_dma: You need to stop the DMA channels before unlinking\n");
564 dma_chan[lch_head].next_lch = -1;
568 static struct lcd_dma_info {
571 void (* callback)(u16 status, void *data);
574 unsigned long addr, size;
575 int rotate, data_type, xres, yres;
578 void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
582 lcd_dma.data_type = data_type;
583 lcd_dma.xres = fb_xres;
584 lcd_dma.yres = fb_yres;
587 static void set_b1_regs(void)
589 unsigned long top, bottom;
596 switch (lcd_dma.data_type) {
597 case OMAP_DMA_DATA_TYPE_S8:
600 case OMAP_DMA_DATA_TYPE_S16:
603 case OMAP_DMA_DATA_TYPE_S32:
611 if (lcd_dma.rotate == 0) {
613 bottom = lcd_dma.addr + (lcd_dma.xres * lcd_dma.yres - 1) * es;
614 /* 1510 DMA requires the bottom address to be 2 more than the
615 * actual last memory access location. */
616 if (omap_dma_in_1510_mode() &&
617 lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32)
624 top = lcd_dma.addr + (lcd_dma.xres - 1) * es;
625 bottom = lcd_dma.addr + (lcd_dma.yres - 1) * lcd_dma.xres * es;
628 ei = (lcd_dma.xres - 1) * es + 1;
629 fi = -(lcd_dma.xres * (lcd_dma.yres - 1) + 2) * 2 + 1;
632 if (omap_dma_in_1510_mode()) {
633 omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
634 omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
635 omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
636 omap_writew(bottom, OMAP1510_DMA_LCD_BOT_F1_L);
642 omap_writew(top >> 16, OMAP1610_DMA_LCD_TOP_B1_U);
643 omap_writew(top, OMAP1610_DMA_LCD_TOP_B1_L);
644 omap_writew(bottom >> 16, OMAP1610_DMA_LCD_BOT_B1_U);
645 omap_writew(bottom, OMAP1610_DMA_LCD_BOT_B1_L);
647 omap_writew(en, OMAP1610_DMA_LCD_SRC_EN_B1);
648 omap_writew(fn, OMAP1610_DMA_LCD_SRC_FN_B1);
650 w = omap_readw(OMAP1610_DMA_LCD_CSDP);
652 w |= lcd_dma.data_type;
653 omap_writew(w, OMAP1610_DMA_LCD_CSDP);
659 l = omap_readw(OMAP1610_DMA_LCD_CSDP);
660 /* Disable burst access */
662 omap_writew(l, OMAP1610_DMA_LCD_CSDP);
664 l = omap_readw(OMAP1610_DMA_LCD_CCR);
665 /* Set the double-indexed addressing mode */
667 omap_writew(l, OMAP1610_DMA_LCD_CCR);
669 omap_writew(ei, OMAP1610_DMA_LCD_SRC_EI_B1);
670 omap_writew(fi >> 16, OMAP1610_DMA_LCD_SRC_FI_B1_U);
671 omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L);
674 void omap_set_lcd_dma_b1_rotation(int rotate)
676 if (omap_dma_in_1510_mode()) {
677 printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n");
681 lcd_dma.rotate = rotate;
684 int omap_request_lcd_dma(void (* callback)(u16 status, void *data),
687 spin_lock_irq(&lcd_dma.lock);
688 if (lcd_dma.reserved) {
689 spin_unlock_irq(&lcd_dma.lock);
690 printk(KERN_ERR "LCD DMA channel already reserved\n");
694 lcd_dma.reserved = 1;
695 spin_unlock_irq(&lcd_dma.lock);
696 lcd_dma.callback = callback;
697 lcd_dma.cb_data = data;
702 void omap_free_lcd_dma(void)
704 spin_lock(&lcd_dma.lock);
705 if (!lcd_dma.reserved) {
706 spin_unlock(&lcd_dma.lock);
707 printk(KERN_ERR "LCD DMA is not reserved\n");
711 if (!enable_1510_mode)
712 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, OMAP1610_DMA_LCD_CCR);
713 lcd_dma.reserved = 0;
714 spin_unlock(&lcd_dma.lock);
717 void omap_start_lcd_dma(void)
719 if (!enable_1510_mode) {
720 /* Set some reasonable defaults */
721 omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP);
722 omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL);
723 omap_writew(0x5740, OMAP1610_DMA_LCD_CCR);
726 if (!enable_1510_mode)
727 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) | 1, OMAP1610_DMA_LCD_CCR);
730 void omap_stop_lcd_dma(void)
732 if (!enable_1510_mode)
733 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, OMAP1610_DMA_LCD_CCR);
736 static int __init omap_init_dma(void)
740 if (cpu_is_omap1510()) {
741 printk(KERN_INFO "DMA support for OMAP1510 initialized\n");
743 enable_1510_mode = 1;
744 } else if (cpu_is_omap1610() || cpu_is_omap5912() || cpu_is_omap730() || cpu_is_omap1710()) {
745 printk(KERN_INFO "OMAP DMA hardware version %d\n",
746 omap_readw(OMAP_DMA_HW_ID));
747 printk(KERN_INFO "DMA capabilities: %08x:%08x:%04x:%04x:%04x\n",
748 (omap_readw(OMAP_DMA_CAPS_0_U) << 16) | omap_readw(OMAP_DMA_CAPS_0_L),
749 (omap_readw(OMAP_DMA_CAPS_1_U) << 16) | omap_readw(OMAP_DMA_CAPS_1_L),
750 omap_readw(OMAP_DMA_CAPS_2), omap_readw(OMAP_DMA_CAPS_3),
751 omap_readw(OMAP_DMA_CAPS_4));
752 if (!enable_1510_mode) {
755 /* Disable OMAP 3.0/3.1 compatibility mode. */
756 w = omap_readw(OMAP_DMA_GSCR);
758 omap_writew(w, OMAP_DMA_GSCR);
759 dma_chan_count = OMAP_LOGICAL_DMA_CH_COUNT;
767 memset(&lcd_dma, 0, sizeof(lcd_dma));
768 spin_lock_init(&lcd_dma.lock);
769 spin_lock_init(&dma_chan_lock);
770 memset(&dma_chan, 0, sizeof(dma_chan));
772 for (ch = 0; ch < dma_chan_count; ch++) {
773 dma_chan[ch].dev_id = -1;
774 dma_chan[ch].next_lch = -1;
776 if (ch >= 6 && enable_1510_mode)
779 /* request_irq() doesn't like dev_id (ie. ch) being zero,
780 * so we have to kludge around this. */
781 r = request_irq(dma_irq[ch], dma_irq_handler, 0, "DMA",
786 printk(KERN_ERR "unable to request IRQ %d for DMA (error %d)\n",
788 for (i = 0; i < ch; i++)
789 free_irq(dma_irq[i], (void *) (i + 1));
796 arch_initcall(omap_init_dma);
798 EXPORT_SYMBOL(omap_request_dma);
799 EXPORT_SYMBOL(omap_free_dma);
800 EXPORT_SYMBOL(omap_start_dma);
801 EXPORT_SYMBOL(omap_stop_dma);
802 EXPORT_SYMBOL(omap_enable_dma_irq);
803 EXPORT_SYMBOL(omap_disable_dma_irq);
805 EXPORT_SYMBOL(omap_set_dma_transfer_params);
806 EXPORT_SYMBOL(omap_set_dma_constant_fill);
807 EXPORT_SYMBOL(omap_set_dma_transparent_copy);
809 EXPORT_SYMBOL(omap_set_dma_src_params);
810 EXPORT_SYMBOL(omap_set_dma_src_index);
811 EXPORT_SYMBOL(omap_set_dma_src_data_pack);
812 EXPORT_SYMBOL(omap_set_dma_src_burst_mode);
814 EXPORT_SYMBOL(omap_set_dma_dest_params);
815 EXPORT_SYMBOL(omap_set_dma_dest_index);
816 EXPORT_SYMBOL(omap_set_dma_dest_data_pack);
817 EXPORT_SYMBOL(omap_set_dma_dest_burst_mode);
819 EXPORT_SYMBOL(omap_dma_link_lch);
820 EXPORT_SYMBOL(omap_dma_unlink_lch);
822 EXPORT_SYMBOL(omap_request_lcd_dma);
823 EXPORT_SYMBOL(omap_free_lcd_dma);
824 EXPORT_SYMBOL(omap_start_lcd_dma);
825 EXPORT_SYMBOL(omap_stop_lcd_dma);
826 EXPORT_SYMBOL(omap_set_lcd_dma_b1);
827 EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation);