dmaengine: axi-dmac: add support for reading bus attributes from registers
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Tue, 25 Aug 2020 15:19:50 +0000 (18:19 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 25 Aug 2020 15:37:11 +0000 (21:07 +0530)
commit78a2f92e4c4a3b775add7f99d04f8acf2fcb48d7
treea4c2cc20cf88d1d67497b50b0a3826cfa22a84d0
parent3061a65c1b3dbcad0d6c03e4edc606698cfa05d2
dmaengine: axi-dmac: add support for reading bus attributes from registers

Starting with core version 4.3.a the DMA bus attributes can (and should) be
read from the INTERFACE_DESCRIPTION (0x10) register.

For older core versions, this will still need to be provided from the
device-tree.

The bus-type values are identical to the ones stored in the device-trees,
so we just need to read them. Bus-width values are stored in log2 values,
so we just need to use them as shift values to make them equivalent to the
current format.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200825151950.57605-7-alexandru.ardelean@analog.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-axi-dmac.c