diff options
author | Siddharth Vadapalli <s-vadapalli@ti.com> | 2024-01-24 18:13:18 +0530 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-01-30 22:13:51 +0530 |
commit | 7cbf7f4bf71a054d687c8860380c655a36d0f369 (patch) | |
tree | 6bab761feb45f48cd5bf93741fb4c410acc51c42 /include | |
parent | 7edd7a2fd345b10e80ee854aaacc6452d6f46a7e (diff) | |
download | linux-7cbf7f4bf71a054d687c8860380c655a36d0f369.tar.gz linux-7cbf7f4bf71a054d687c8860380c655a36d0f369.tar.bz2 linux-7cbf7f4bf71a054d687c8860380c655a36d0f369.zip |
dmaengine: ti: k3-udma-glue: Add function to request TX chan for thread ID
The existing function k3_udma_glue_request_tx_chn() supports requesting
a TX DMA channel by its name. Add a new function to request TX DMA channel
for a given thread ID, named k3_udma_glue_request_tx_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 TX DMA
channel by RPMsg for example.
Since the new function k3_udma_glue_request_tx_chn_for_thread_id() reuses
most of the code in k3_udma_glue_request_tx_chn(), create a new function
for the common code, named k3_udma_glue_request_tx_chn_common().
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-4-s-vadapalli@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dma/k3-udma-glue.h | 5 |
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 e443be4d3b4b..c81386ceb1c1 100644 --- a/include/linux/dma/k3-udma-glue.h +++ b/include/linux/dma/k3-udma-glue.h @@ -26,6 +26,11 @@ struct k3_udma_glue_tx_channel; struct k3_udma_glue_tx_channel *k3_udma_glue_request_tx_chn(struct device *dev, const char *name, struct k3_udma_glue_tx_channel_cfg *cfg); +struct k3_udma_glue_tx_channel * +k3_udma_glue_request_tx_chn_for_thread_id(struct device *dev, + struct k3_udma_glue_tx_channel_cfg *cfg, + struct device_node *udmax_np, u32 thread_id); + void k3_udma_glue_release_tx_chn(struct k3_udma_glue_tx_channel *tx_chn); int k3_udma_glue_push_tx_chn(struct k3_udma_glue_tx_channel *tx_chn, struct cppi5_host_desc_t *desc_tx, |