[PATCH v2 02/16] dmaengine: qcom: bam_dma: add bam_pipe_lock dt property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bam having locking and unlocking mechanism of bam pipes.
Upon encountering a descriptor with Lock bit set, the
BAM will lock all other pipes not related to the current
pipe group, and keep handling the current pipe only until
it sees the Un-Lock set , then it will release all locked
pipes. The actual locking is done on the new descriptor
fetching for publishing, i.e. locked pipe will not fetch
new descriptors even if it got event/events adding more
descriptors for this pipe.

Adding the bam_pipe_lock flag in bam driver to handle
Lock and Un-Lock bit set on command descriptor.

Signed-off-by: Md Sadre Alam <quic_mdalam@xxxxxxxxxxx>
---

Change in [v2]

* Added bam_pipe_lock dt property

Change in [v1]

* This patch was not included in [v1]

 drivers/dma/qcom/bam_dma.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 5e7d332731e0..1ac7e250bdaa 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -389,6 +389,7 @@ struct bam_device {
 	u32 ee;
 	bool controlled_remotely;
 	bool powered_remotely;
+	bool bam_pipe_lock;
 	u32 active_channels;
 
 	const struct reg_offset_data *layout;
@@ -1272,6 +1273,9 @@ static int bam_dma_probe(struct platform_device *pdev)
 	bdev->powered_remotely = of_property_read_bool(pdev->dev.of_node,
 						"qcom,powered-remotely");
 
+	bdev->bam_pipe_lock = of_property_read_bool(pdev->dev.of_node,
+						    "qcom,bam_pipe_lock");
+
 	if (bdev->controlled_remotely || bdev->powered_remotely)
 		bdev->bamclk = devm_clk_get_optional(bdev->dev, "bam_clk");
 	else
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux