]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 2 Sep 2019 11:44:03 +0000 (20:44 +0900)
committerVinod Koul <vkoul@kernel.org>
Wed, 4 Sep 2019 06:05:58 +0000 (11:35 +0530)
commit55db7fc8c2c1fe6a4a20396e996f5cd80c18823b
treea62efbcfd0a750f1dd8db94426410bd2f50543a0
parent93948606882c311c7f1b11419fb1330633d945d2
dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped

The commit 3f4be8df3261 ("dmaengine: rcar-dmac: clear pertinence
number of channels") forgets to clear the last channel by
DMACHCLR in rcar_dmac_init() (and doesn't need to clear the first
channel) if iommu is mapped to the device. So, this patch fixes it
by using "channels_mask" bitfield.

Note that the hardware and driver don't support more than 32 bits
in DMACHCLR register anyway, so this patch should reject more than
32 channels in rcar_dmac_parse_of().

Fixes: 3f4be8df32615abb ("dmaengine: rcar-dmac: clear pertinence number of channels")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1567424643-26629-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rcar-dmac.c