Commit e2de925b authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul
Browse files

dmaengine: ti: k3-udma: Correct normal channel offset when uchan_cnt is not 0



According to different sections of the TRM, the hchan_cnt of CAP3 includes
the number of uchan in UDMA, thus the start offset of the normal channels
are hchan_cnt.

Fixes: daf4ad04 ("dmaengine: ti: k3-udma: Query throughput level information from hardware")
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201208090440.31792-2-peter.ujfalusi@ti.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 6ef4474a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3199,8 +3199,7 @@ static int udma_setup_resources(struct udma_dev *ud)
	} else if (UDMA_CAP3_UCHAN_CNT(cap3)) {
		ud->tpl_levels = 3;
		ud->tpl_start_idx[1] = UDMA_CAP3_UCHAN_CNT(cap3);
		ud->tpl_start_idx[0] = ud->tpl_start_idx[1] +
				       UDMA_CAP3_HCHAN_CNT(cap3);
		ud->tpl_start_idx[0] = UDMA_CAP3_HCHAN_CNT(cap3);
	} else if (UDMA_CAP3_HCHAN_CNT(cap3)) {
		ud->tpl_levels = 2;
		ud->tpl_start_idx[0] = UDMA_CAP3_HCHAN_CNT(cap3);