dmaengine: ti: k3-udma: Query throughput level information from hardware
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 17 Jul 2020 12:09:03 +0000 (15:09 +0300)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 Jul 2020 08:53:03 +0000 (14:23 +0530)
commitdaf4ad0499aa4f75c6f32493829acdbe48110b32
tree728566a2cd13a3e51da4857fdefc14682c2ddd0c
parent44385c4171d03b1aa030f3f21a6fce2f6edcfdab
dmaengine: ti: k3-udma: Query throughput level information from hardware

The CAP3 register contains information about the number of
HCHAN (High Capacity) and UCHAN (Ultra High Capacity) channels in UDMAP.

Based on this information the start indexes of the levels can be calculated
without a need of a table in the match data.

On am654 the CAP3 does not contain information about the number different
channels. Set up the tpl information based on the available documentation.

This change will allow to use the same compatible for different SoCs where
the only difference is the number of channel types.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200717120903.8774-3-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma.c
drivers/dma/ti/k3-udma.h