1 /* arch/arm/plat-samsung/include/plat/dma-ops.h
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
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.
13 #ifndef __SAMSUNG_DMA_OPS_H_
14 #define __SAMSUNG_DMA_OPS_H_ __FILE__
16 #include <linux/dmaengine.h>
18 struct samsung_dma_prep_info
{
19 enum dma_transaction_type cap
;
20 enum dma_data_direction direction
;
24 void (*fp
)(void *data
);
28 struct samsung_dma_info
{
29 enum dma_transaction_type cap
;
30 enum dma_data_direction direction
;
31 enum dma_slave_buswidth width
;
33 struct s3c2410_dma_client
*client
;
36 struct samsung_dma_ops
{
37 unsigned (*request
)(enum dma_ch ch
, struct samsung_dma_info
*info
);
38 int (*release
)(unsigned ch
, struct s3c2410_dma_client
*client
);
39 int (*prepare
)(unsigned ch
, struct samsung_dma_prep_info
*info
);
40 int (*trigger
)(unsigned ch
);
41 int (*started
)(unsigned ch
);
42 int (*flush
)(unsigned ch
);
43 int (*stop
)(unsigned ch
);
46 extern void *samsung_dmadev_get_ops(void);
47 extern void *s3c_dma_get_ops(void);
49 static inline void *__samsung_dma_get_ops(void)
51 if (samsung_dma_is_dmadev())
52 return samsung_dmadev_get_ops();
54 return s3c_dma_get_ops();
59 * get the set of samsung dma operations
61 #define samsung_dma_get_ops() __samsung_dma_get_ops()
63 #endif /* __SAMSUNG_DMA_OPS_H_ */