MIPS: lantiq: dma: reset correct number of channel
authorAleksander Jan Bajkowski <olek2@wp.pl>
Tue, 14 Sep 2021 21:20:59 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:09 +0000 (19:16 +0100)
commita244da29841869c0eb9670152fb58e50a32a1894
tree2ca7ac647c5992d52ef77b7a3d811e1b074915bb
parent6a5b3f5dfb02e2ce9f0c98e74b18b7d1ad9cf13d
MIPS: lantiq: dma: reset correct number of channel

[ Upstream commit 5ca9ce2ba4d5884cd94d1a856c675ab1242cd242 ]

Different SoCs have a different number of channels, e.g .:
* amazon-se has 10 channels,
* danube+ar9 have 20 channels,
* vr9 has 28 channels,
* ar10 has 24 channels.

We can read the ID register and, depending on the reported
number of channels, reset the appropriate number of channels.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/lantiq/xway/dma.c