Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757483AbcCCKwr (ORCPT ); Thu, 3 Mar 2016 05:52:47 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:46827 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756508AbcCCKwo (ORCPT ); Thu, 3 Mar 2016 05:52:44 -0500 From: Laurent Pinchart To: Kuninori Morimoto Cc: Geert Uytterhoeven , Robin Murphy , Vinod Koul , Linus Walleij , Dan Williams , Arnd Bergmann , linux-renesas-soc@vger.kernel.org, "linux-kernel@vger.kernel.org" , dmaengine@vger.kernel.org Subject: Re: [PATCH v2] dma: rcar-dmac: clear pertinence number of channels Date: Thu, 03 Mar 2016 12:52:43 +0200 Message-ID: <1688525.rReolS6g1X@avalon> User-Agent: KMail/4.14.8 (Linux/4.1.15-gentoo-r1; KDE/4.14.8; x86_64; ; ) In-Reply-To: <874mcoarxq.wl%kuninori.morimoto.gx@renesas.com> References: <87d1rcayon.wl%kuninori.morimoto.gx@renesas.com> <874mcoarxq.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1266 Lines: 41 Hi Morimoto-san, Thank you for the patch. On Thursday 03 March 2016 17:25:53 Kuninori Morimoto wrote: > From: Kuninori Morimoto > > 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 > Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart > --- > v1 -> v2 > > - 14ch -> 15ch > > drivers/dma/sh/rcar-dmac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c > index 57a6dfc9..02b86c6 100644 > --- a/drivers/dma/sh/rcar-dmac.c > +++ b/drivers/dma/sh/rcar-dmac.c > @@ -422,7 +422,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); -- Regards, Laurent Pinchart