blob: 3280ee2ddfa591cbbbe42e1336c7b89f4627e2aa [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-arm/arch-pxa/dma.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __ASM_ARCH_DMA_H
13#define __ASM_ARCH_DMA_H
14
Linus Torvalds1da177e2005-04-16 15:20:36 -070015/*
16 * Descriptor structure for PXA's DMA engine
17 * Note: this structure must always be aligned to a 16-byte boundary.
18 */
19
20typedef struct pxa_dma_desc {
21 volatile u32 ddadr; /* Points to the next descriptor + flags */
22 volatile u32 dsadr; /* DSADR value for the current transfer */
23 volatile u32 dtadr; /* DTADR value for the current transfer */
24 volatile u32 dcmd; /* DCMD value for the current transfer */
25} pxa_dma_desc;
26
Nicolas Pitre99532552006-05-05 22:32:24 +010027typedef enum {
28 DMA_PRIO_HIGH = 0,
29 DMA_PRIO_MEDIUM = 1,
30 DMA_PRIO_LOW = 2
31} pxa_dma_prio;
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033/*
34 * DMA registration
35 */
36
Eric Miaof53f0662007-06-22 05:40:17 +010037int __init pxa_init_dma(int num_ch);
38
Linus Torvalds1da177e2005-04-16 15:20:36 -070039int pxa_request_dma (char *name,
40 pxa_dma_prio prio,
Linus Torvalds0cd61b62006-10-06 10:53:39 -070041 void (*irq_handler)(int, void *),
Linus Torvalds1da177e2005-04-16 15:20:36 -070042 void *data);
43
44void pxa_free_dma (int dma_ch);
45
46#endif /* _ASM_ARCH_DMA_H */