summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorR Sricharan <r.sricharan@ti.com>2014-03-07 17:46:09 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2014-08-28 12:05:49 +0530
commitdd5cdc95cd8de84150f65732dccbf59b73488a05 (patch)
tree8c39c1a733a16a67b4ce4b8d19db9ba02fe85b10 /include
parent732de18cbd4cc7f1b03ed26790ef4e4868d98f16 (diff)
drivers: dma: of-dma: Add support for dma-request line routers
In some socs dma requests lines from the peripherals to the dma controller can be connected either directly or through a crossbar router. The crossbar in turn maps the peripheral request line to a free dma-controller request line. In such cases the crossbar associated with the particular request lines has to configured. This add two APIS, one to register the crossbar router and other to retrieve the router associated with a dma request line. The peripheral's dma-specs mentions the dma-controller, request-line and also the IP to which it is connected to via DT. The dma-controller will have to check if a request line is routed and then use that router's map/unmap function to configure the request line. Signed-off-by: R Sricharan <r.sricharan@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/of_dma.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index ae36298ba07..ad6c4812e27 100644
--- a/include/linux/of_dma.h
+++ b/include/linux/of_dma.h
@@ -26,6 +26,12 @@ struct of_dma {
void *of_dma_data;
};
+struct of_dma_router {
+ struct list_head of_dma_routers;
+ struct device_node *of_node;
+ void *of_router_data;
+};
+
struct of_dma_filter_info {
dma_cap_mask_t dma_cap;
dma_filter_fn filter_fn;
@@ -41,6 +47,9 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
const char *name);
extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma);
+void *of_dma_get_router_data(phandle router);
+int of_dma_router_register(struct device_node *np, void *data);
+void of_dma_router_free(struct device_node *np);
#else
static inline int of_dma_controller_register(struct device_node *np,
struct dma_chan *(*of_dma_xlate)
@@ -66,6 +75,19 @@ static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_s
return NULL;
}
+static inline void *of_dma_get_router_data(phandle router)
+{
+ return NULL;
+}
+
+static inline int of_dma_router_register(struct device_node *np, void *data)
+{
+ return NULL;
+}
+
+static void of_dma_router_free(struct device_node *np)
+{
+}
#endif
#endif /* __LINUX_OF_DMA_H */