Skip to content

Commit 372f8b3

Browse files
r-vigneshvinodkoul
authored andcommitted
dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels
Unlike other channel counts in CAPx registers, BCDMA BCHAN CNT doesn't include UHC and HC BC channels. So include them explicitly to arrive at total BC channel in the instance. Fixes: 8844898 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling") Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Jai Luthra <j-luthra@ti.com> Tested-by: Jayesh Choudhary <j-choudhary@ti.com> Link: https://lore.kernel.org/r/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 0e53aa3 commit 372f8b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4473,7 +4473,9 @@ static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud)
44734473
ud->rchan_cnt = UDMA_CAP2_RCHAN_CNT(cap2);
44744474
break;
44754475
case DMA_TYPE_BCDMA:
4476-
ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2);
4476+
ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2) +
4477+
BCDMA_CAP3_HBCHAN_CNT(cap3) +
4478+
BCDMA_CAP3_UBCHAN_CNT(cap3);
44774479
ud->tchan_cnt = BCDMA_CAP2_TCHAN_CNT(cap2);
44784480
ud->rchan_cnt = BCDMA_CAP2_RCHAN_CNT(cap2);
44794481
ud->rflow_cnt = ud->rchan_cnt;

0 commit comments

Comments
 (0)