Merge git://git.infradead.org/~dwmw2/cafe-2.6
[sfrench/cifs-2.6.git] / arch / arm / mach-s3c2410 / dma.h
1 /* arch/arm/mach-s3c2410/dma.h
2  *
3  * Copyright (C) 2006 Simtec Electronics
4  *      Ben Dooks <ben@simtec.co.uk>
5  *
6  * Samsung S3C24XX DMA support
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
13 extern struct sysdev_class dma_sysclass;
14 extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
15
16 #define DMA_CH_VALID            (1<<31)
17
18 struct s3c24xx_dma_addr {
19         unsigned long           from;
20         unsigned long           to;
21 };
22
23 /* struct s3c24xx_dma_map
24  *
25  * this holds the mapping information for the channel selected
26  * to be connected to the specified device
27 */
28
29 struct s3c24xx_dma_map {
30         const char              *name;
31         struct s3c24xx_dma_addr  hw_addr;
32
33         unsigned long            channels[S3C2410_DMA_CHANNELS];
34 };
35
36 struct s3c24xx_dma_selection {
37         struct s3c24xx_dma_map  *map;
38         unsigned long            map_size;
39         unsigned long            dcon_mask;
40
41         void    (*select)(struct s3c2410_dma_chan *chan,
42                           struct s3c24xx_dma_map *map);
43 };
44
45 extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);