]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.4/dmaengine-pl330-issue_pending-waits-until-wfp-state.patch
Fixes for 5.4
[thirdparty/kernel/stable-queue.git] / queue-5.4 / dmaengine-pl330-issue_pending-waits-until-wfp-state.patch
1 From 76ffcf0a9b4ee1e48e9f7ff7e68ace9bc1b457e6 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Tue, 19 Dec 2023 14:50:26 +0900
4 Subject: dmaengine: pl330: issue_pending waits until WFP state
5
6 From: Bumyong Lee <bumyong.lee@samsung.com>
7
8 [ Upstream commit 22a9d9585812440211b0b34a6bc02ade62314be4 ]
9
10 According to DMA-330 errata notice[1] 71930, DMAKILL
11 cannot clear internal signal, named pipeline_req_active.
12 it makes that pl330 would wait forever in WFP state
13 although dma already send dma request if pl330 gets
14 dma request before entering WFP state.
15
16 The errata suggests that polling until entering WFP state
17 as workaround and then peripherals allows to issue dma request.
18
19 [1]: https://developer.arm.com/documentation/genc008428/latest
20
21 Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
22 Link: https://lore.kernel.org/r/20231219055026.118695-1-bumyong.lee@samsung.com
23 Signed-off-by: Vinod Koul <vkoul@kernel.org>
24 Stable-dep-of: afc89870ea67 ("dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"")
25 Signed-off-by: Sasha Levin <sashal@kernel.org>
26 ---
27 drivers/dma/pl330.c | 3 +++
28 1 file changed, 3 insertions(+)
29
30 diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
31 index 1d7d4b8d810a5..d12939c25a618 100644
32 --- a/drivers/dma/pl330.c
33 +++ b/drivers/dma/pl330.c
34 @@ -1051,6 +1051,9 @@ static bool _trigger(struct pl330_thread *thrd)
35
36 thrd->req_running = idx;
37
38 + if (desc->rqtype == DMA_MEM_TO_DEV || desc->rqtype == DMA_DEV_TO_MEM)
39 + UNTIL(thrd, PL330_STATE_WFP);
40 +
41 return true;
42 }
43
44 --
45 2.43.0
46