dmaengine: tegra210-adma: add support for Tegra186/Tegra194
authorSameer Pujar <spujar@nvidia.com>
Thu, 2 May 2019 12:55:14 +0000 (18:25 +0530)
committerVinod Koul <vkoul@kernel.org>
Sat, 4 May 2019 10:43:41 +0000 (16:13 +0530)
commit433de642a76c9e68641ee5a8c7b2720d4e8629a5
tree84a7b9d4a1b395919fe01f82e7a51825ce353792
parentc0e74dd25422e32f2e65ee868c8b5c828b8c5b61
dmaengine: tegra210-adma: add support for Tegra186/Tegra194

Add Tegra186 specific macro defines and chip_data structure for chip
specific information. New compatibility is added to select relevant
chip details. There is no major change for Tegra194 and hence it can
use the same chip data.

The bits in the BURST_SIZE field of the ADMA CH_CONFIG register are
encoded differently on Tegra186 and Tegra194 compared with Tegra210.
On Tegra210 the bits are encoded as follows ...

 1 = WORD_1
 2 = WORDS_2
 3 = WORDS_4
 4 = WORDS_8
 5 = WORDS_16

Where as on Tegra186 and Tegra194 the bits are encoded as ...

 0 = WORD_1
 1 = WORDS_2
 2 = WORDS_3
 3 = WORDS_4
 4 = WORDS_5
 ...
 15 = WORDS_16

Add helper functions for generating the correct burst size.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/tegra210-adma.c