aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_dma.h')
-rw-r--r--include/linux/of_dma.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
new file mode 100644
index 000000000000..337823dc6b90
--- /dev/null
+++ b/include/linux/of_dma.h
@@ -0,0 +1,45 @@
1/*
2 * OF helpers for DMA request / controller
3 *
4 * Based on of_gpio.h
5 *
6 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
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 __LINUX_OF_DMA_H
14#define __LINUX_OF_DMA_H
15
16#include <linux/of.h>
17#include <linux/dmaengine.h>
18
19struct device_node;
20
21struct of_dma {
22 struct list_head of_dma_controllers;
23 struct device_node *of_node;
24 int of_dma_nbcells;
25 struct dma_chan *(*of_dma_xlate)
26 (struct of_phandle_args *, struct of_dma *);
27 void *of_dma_data;
28};
29
30struct of_dma_filter_info {
31 dma_cap_mask_t dma_cap;
32 dma_filter_fn filter_fn;
33};
34
35extern int of_dma_controller_register(struct device_node *np,
36 struct dma_chan *(*of_dma_xlate)
37 (struct of_phandle_args *, struct of_dma *),
38 void *data);
39extern void of_dma_controller_free(struct device_node *np);
40extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
41 char *name);
42extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
43 struct of_dma *ofdma);
44
45#endif /* __LINUX_OF_DMA_H */