Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dma-ops.h
Go to the documentation of this file.
1 /* arch/arm/plat-samsung/include/plat/dma-ops.h
2  *
3  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4  * http://www.samsung.com
5  *
6  * Samsung 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 #ifndef __SAMSUNG_DMA_OPS_H_
14 #define __SAMSUNG_DMA_OPS_H_ __FILE__
15 
16 #include <linux/dmaengine.h>
17 #include <mach/dma.h>
18 
23 };
24 
29  unsigned long period;
30  unsigned long len;
31  void (*fp)(void *data);
32  void *fp_param;
33 };
34 
39 };
40 
42  unsigned (*request)(enum dma_ch ch, struct samsung_dma_req *param);
43  int (*release)(unsigned ch, void *param);
44  int (*config)(unsigned ch, struct samsung_dma_config *param);
45  int (*prepare)(unsigned ch, struct samsung_dma_prep *param);
46  int (*trigger)(unsigned ch);
47  int (*started)(unsigned ch);
48  int (*flush)(unsigned ch);
49  int (*stop)(unsigned ch);
50 };
51 
52 extern void *samsung_dmadev_get_ops(void);
53 extern void *s3c_dma_get_ops(void);
54 
55 static inline void *__samsung_dma_get_ops(void)
56 {
57  if (samsung_dma_is_dmadev())
58  return samsung_dmadev_get_ops();
59  else
60  return s3c_dma_get_ops();
61 }
62 
63 /*
64  * samsung_dma_get_ops
65  * get the set of samsung dma operations
66  */
67 #define samsung_dma_get_ops() __samsung_dma_get_ops()
68 
69 #endif /* __SAMSUNG_DMA_OPS_H_ */