Skip to content

Commit 20c169a

Browse files
morimotoVinod Koul
authored andcommitted
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 <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 6fb5629 commit 20c169a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/sh/rcar-dmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static int rcar_dmac_init(struct rcar_dmac *dmac)
413413
u16 dmaor;
414414

415415
/* Clear all channels and enable the DMAC globally. */
416-
rcar_dmac_write(dmac, RCAR_DMACHCLR, 0x7fff);
416+
rcar_dmac_write(dmac, RCAR_DMACHCLR, GENMASK(dmac->n_channels - 1, 0));
417417
rcar_dmac_write(dmac, RCAR_DMAOR,
418418
RCAR_DMAOR_PRI_FIXED | RCAR_DMAOR_DME);
419419

0 commit comments

Comments
 (0)