diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2016-03-03 08:25:53 (GMT) |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-03-03 16:21:14 (GMT) |
commit | 20c169aceb459575681c4f4578d0e312bd1436c1 (patch) | |
tree | e1f4dc988c3338626c26580825fc7fbe4381dede /drivers/dma | |
parent | 6fb5629987239c6a8438fab8fd324b7724e49453 (diff) | |
download | linux-20c169aceb459575681c4f4578d0e312bd1436c1.tar.xz |
dmaengine: rcar-dmac: clear pertinence number of channels
DMACHCLR clears each channels, but its channel number is based on
its SoC or IP. Current driver is using fixed 0x7fff (= for 15ch),
it is not good match for Gen3 or Gen2 Audio DMAC. This patch fixes it
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/sh/rcar-dmac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 7820d07..dfb1792 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -413,7 +413,7 @@ static int rcar_dmac_init(struct rcar_dmac *dmac) u16 dmaor; /* Clear all channels and enable the DMAC globally. */ - rcar_dmac_write(dmac, RCAR_DMACHCLR, 0x7fff); + rcar_dmac_write(dmac, RCAR_DMACHCLR, GENMASK(dmac->n_channels - 1, 0)); rcar_dmac_write(dmac, RCAR_DMAOR, RCAR_DMAOR_PRI_FIXED | RCAR_DMAOR_DME); |