Skip to contentSkip to conversation

dmaengine: ti: k3-udma: Set rflow count for BCDMA split channels

PATCH In review Vignesh Raghavendra 2 participants 2 messages Jan 12, 2021

Subsystems (2)
lore
Share & tools
lore

Vignesh Raghavendra

author maintainer
#0 lore raw

PATCH 1/1 dmaengine: ti: k3-udma: Set rflow count for BCDMA split channels

BCDMA RX channels have one flow per channel, therefore set the rflow_cnt to rchan_cnt.

Without this patch, request for BCDMA RX channel allocation fails as rflow_cnt is 0 thus fails to reserve a rflow for the channel.

Fixes 8844898028d4 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling")
---
 drivers/dma/ti/k3-udma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma/ti/k3-udma.c +1 -0
index 298460438bb4..a1af59d901be 100644
@@ -4305,6 +4305,7 @@ static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud)
 		ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2);
 		ud->tchan_cnt = BCDMA_CAP2_TCHAN_CNT(cap2);
 		ud->rchan_cnt = BCDMA_CAP2_RCHAN_CNT(cap2);
+		ud->rflow_cnt = ud->rchan_cnt;
 		break;
 	case DMA_TYPE_PKTDMA:
 		cap4 = udma_read(ud->mmrs[MMR_GCFG], 0x30);
Signature · 1 line
2.30.0
Acked-by on v1 1/1
#1 lore raw

Hi Vignesh,

Quoted 5 lines · Vignesh Raghavendra

BCDMA RX channels have one flow per channel, therefore set the rflow_cnt to rchan_cnt.

Without this patch, request for BCDMA RX channel allocation fails as rflow_cnt is 0 thus fails to reserve a rflow for the channel.

Good catch, thank you!

Quoted 20 lines
Fixes 8844898028d4 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling")
---
  drivers/dma/ti/k3-udma.c | 1 +
  1 file changed, 1 insertion(+)
drivers/dma/ti/k3-udma.c +1 -0
index 298460438bb4..a1af59d901be 100644
@@ -4305,6 +4305,7 @@ static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud)
  		ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2);
  		ud->tchan_cnt = BCDMA_CAP2_TCHAN_CNT(cap2);
  		ud->rchan_cnt = BCDMA_CAP2_RCHAN_CNT(cap2);
+		ud->rflow_cnt = ud->rchan_cnt;
  		break;
  	case DMA_TYPE_PKTDMA:
  		cap4 = udma_read(ud->mmrs[MMR_GCFG], 0x30);
Signature · 1 line
Péter