summaryrefslogtreecommitdiffstats
path: root/include/linux/dma
diff options
context:
space:
mode:
authorSiddharth Vadapalli <s-vadapalli@ti.com>2024-01-24 18:13:19 +0530
committerVinod Koul <vkoul@kernel.org>2024-01-30 22:13:52 +0530
commite54df52312fed462a005706d5d7ed6250da91d1e (patch)
tree29a0d9d2a4dd86957c1b98e0d2f02ae65ad968e1 /include/linux/dma
parent7cbf7f4bf71a054d687c8860380c655a36d0f369 (diff)
downloadlinux-e54df52312fed462a005706d5d7ed6250da91d1e.tar.gz
linux-e54df52312fed462a005706d5d7ed6250da91d1e.tar.bz2
linux-e54df52312fed462a005706d5d7ed6250da91d1e.zip
dmaengine: ti: k3-udma-glue: Add function to request RX chan for thread ID
The existing function k3_udma_glue_request_remote_rx_chn() supports requesting an RX DMA channel and flow by the name of the RX DMA channel. Add support to request RX DMA channel for a given thread ID in the form of a new function named k3_udma_glue_request_remote_rx_chn_for_thread_id(). Also, export it for use by drivers which are probed by alternate methods (non device-tree) but still wish to make use of the existing DMA APIs. Such drivers could be informed about the thread ID corresponding to the RX DMA channel by RPMsg for example. Since the new function k3_udma_glue_request_remote_rx_chn_for_thread_id() reuses most of the code in k3_udma_glue_request_remote_rx_chn(), create a new function named k3_udma_glue_request_remote_rx_chn_common() for the common code. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20240124124319.820002-5-s-vadapalli@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/dma')
-rw-r--r--include/linux/dma/k3-udma-glue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dma/k3-udma-glue.h b/include/linux/dma/k3-udma-glue.h
index c81386ceb1c1..1e491c5dcac2 100644
--- a/include/linux/dma/k3-udma-glue.h
+++ b/include/linux/dma/k3-udma-glue.h
@@ -114,6 +114,11 @@ struct k3_udma_glue_rx_channel *k3_udma_glue_request_rx_chn(
const char *name,
struct k3_udma_glue_rx_channel_cfg *cfg);
+struct k3_udma_glue_rx_channel *
+k3_udma_glue_request_remote_rx_chn_for_thread_id(struct device *dev,
+ struct k3_udma_glue_rx_channel_cfg *cfg,
+ struct device_node *udmax_np, u32 thread_id);
+
void k3_udma_glue_release_rx_chn(struct k3_udma_glue_rx_channel *rx_chn);
int k3_udma_glue_enable_rx_chn(struct k3_udma_glue_rx_channel *rx_chn);
void k3_udma_glue_disable_rx_chn(struct k3_udma_glue_rx_channel *rx_chn);