summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2019-12-04 22:17:21 +0530
committerJoe Hershberger <joe.hershberger@ni.com>2019-12-09 09:47:43 -0600
commit5e6d9ccde9cf700e19e0d783f1f671a1eb4a60fb (patch)
tree1dda58fd65d436618231818ec63a34b28b9f17d8 /include/linux
parentb8a4dd28f3b719d176fed5dc8d23a898463b072c (diff)
downloadu-boot-5e6d9ccde9cf700e19e0d783f1f671a1eb4a60fb.tar.gz
dma: ti: k3-udma: Implement dma_get_cfg() interface
Implement dma_get_cfg() interface to pass flow id information for DMA clients to use. This is needed because on K3 SoCs, CPSW (ethernet) and UDMA (DMA provider) support "flows" within a given RX DMA channel. This allows different network packets to be segregated while using same RX DMA channel. In order for basic ethernet to work, CPSW slave must be aware of the flow ID allocated for the RX channel by the DMA driver. This interface allows CPSW to query flow ID from DMA provider and configure it in CPSW HW. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/soc/ti/ti-udma.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/soc/ti/ti-udma.h b/include/linux/soc/ti/ti-udma.h
index e9d4226c48..04e354fb2d 100644
--- a/include/linux/soc/ti/ti-udma.h
+++ b/include/linux/soc/ti/ti-udma.h
@@ -21,4 +21,23 @@ struct ti_udma_drv_packet_data {
u32 dest_tag;
};
+/**
+ * struct ti_udma_drv_chan_cfg_data - TI UDMA per channel specific
+ * configuration data
+ *
+ * @flow_id_base: Start index of flow ID allocated to this channel
+ * @flow_id_cnt: Number of flows allocated for this channel starting at
+ * flow_id_base
+ *
+ * TI UDMA channel specific data returned as part of dma_get_cfg() call
+ * from the DMA client driver.
+ */
+struct ti_udma_drv_chan_cfg_data {
+ u32 flow_id_base;
+ u32 flow_id_cnt;
+};
+
+/* TI UDMA specific flag IDs for dma_get_cfg() call */
+#define TI_UDMA_CHAN_PRIV_INFO 0
+
#endif /* __TI_UDMA_H */