Skip to content
Commit cf24aac3 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Vinod Koul
Browse files

dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped



The commit 20c169ac ("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: 20c169ac ("dmaengine: rcar-dmac: clear pertinence number of channels")
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Reviewed-by: default avatarGeert 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: default avatarVinod Koul <vkoul@kernel.org>
parent 689379c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment