Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3037722pxb; Tue, 12 Jan 2021 05:00:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6KGqw/xiWZuNg8Xv6FyYBztvc4E2rYgGvFdMG4C6C42fz+IjRnhwBcnuQT+O3MftLg/lS X-Received: by 2002:a17:906:7f83:: with SMTP id f3mr3025026ejr.282.1610456409001; Tue, 12 Jan 2021 05:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456408; cv=none; d=google.com; s=arc-20160816; b=p9TTmlbU9NqUXh73C5DUb44kHRc5AZT95SRFsTgJ+qaEw0xsm7YkN8oQAdxD/4P0Pg Ljr198Pkw7CvzALBxkOum8tW6BNLHiwlzWtyQImMBN5JVxDEVOa2iPtWQc7Yy5agGSMr UXDKUROp8gS7qurnW3BXCB46op3Y8hfxcYH33pxsOg8atw4jcSGr3gUVx7zk1E6lvRsH Y7xl+Vb1io5LwDhNV/8TwuEw29OxTkiXCDjH7OmgLOsU9ABG8EliuDO8ex0NnNoepCBq wMvjI5aDsi13ClKPelPo3FcTCjpuGFY/p/k8ffv8hVxueS9jAmyXuXFcixg41wqGqT31 cd4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G3WF+GN/t1CytKSZASf42nLSsEsfDGWLqJNJ2HogqB8=; b=r4wqnZvZXCciW6ugiqIoDeMLbEv1xw6i3N/g3+J0HEI7+gXZos2NxuucU1iJ/fFT8C kniP/aop2F+GzLRiEQwi8KdvzLxAVzaVpdX9WbxMxsusAMwfPmCkl7zwyMr9f7CMLoiZ 2New44lWHdrJVj12lcVbsBz189VSWxZjCA6A2nhBAFsd9yJ2Sn7yBjAzt1PksbEi6cyW L6KqtF87dDgkxHLVECllThHU2UipR2DbQFIHF7qYPNrIjvUEXP/ByDpB8N1f9ylJrIIi kKFCWp1K0KYb8PwsBO7I3LSTb8wOF6B5oPmKco3Dc5td9JR0GSIMAL+XHoA0VKCRTUzr KzDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hTeCcZWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si1114131ejf.162.2021.01.12.04.59.45; Tue, 12 Jan 2021 05:00:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hTeCcZWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbhALKhf (ORCPT + 99 others); Tue, 12 Jan 2021 05:37:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:51826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbhALKhf (ORCPT ); Tue, 12 Jan 2021 05:37:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FFB3222B3; Tue, 12 Jan 2021 10:36:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610447814; bh=me4VfGevELMQ1wDfalFTk9vfIzyJP8ihe4XFq/deiiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hTeCcZWpMjgUUWmh27lAfMaApy1y5vIkzINXhL9py33nYqs2xFaO212lc1zPknXyi LbiA04wX8XtKWw6/R1FQbweGMJlzTzUg6vSqrN9kDEAGk3mIZLd+E/z2or+LlrpVNh RFM3jDCztHNUkYaM3qAIty5OHFLfzmeWV7b4F9AlW279xR77Np8n7pUTjZV7l8ItWA fjnBjbfqCwa0KYqWNg7RrgOuz5TdFiGJs6S60DNJU6fM/RD+But/47aTc/BXGJAVI7 cJSL2cbmUiEPZzQrJxkNMheSkrsPXzVccm/Ifb80PANMqjjv9OFgO0e19FD9Vs51g3 hdEidid3tG9YQ== Date: Tue, 12 Jan 2021 16:06:48 +0530 From: Vinod Koul To: Geert Uytterhoeven Cc: Rob Herring , Dan Williams , Yoshihiro Shimoda , Phong Hoang , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] dmaengine: rcar-dmac: Add support for R-Car V3U Message-ID: <20210112103648.GL2771@vkoul-mobl> References: <20210107181524.1947173-1-geert+renesas@glider.be> <20210107181524.1947173-5-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107181524.1947173-5-geert+renesas@glider.be> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07-01-21, 19:15, Geert Uytterhoeven wrote: > The DMACs (both SYS-DMAC and RT-DMAC) on R-Car V3U differ slightly from > the DMACs on R-Car Gen2 and other R-Car Gen3 SoCs: > 1. The per-channel registers are located in a second register block. > Add support for mapping the second block, using the appropriate > offsets and stride. > 2. The common Channel Clear Register (DMACHCLR) was replaced by a > per-channel register. > Update rcar_dmac_chan_clear{,_all}() to handle this. > As rcar_dmac_init() needs to clear the status before the individual > channels are probed, channel index and base address initialization > are moved forward. > > Inspired by a patch in the BSP by Phong Hoang > . > > Signed-off-by: Geert Uytterhoeven > --- > drivers/dma/sh/rcar-dmac.c | 68 +++++++++++++++++++++++++++----------- > 1 file changed, 49 insertions(+), 19 deletions(-) > > diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c > index 990d78849a7de704..c11e6255eba1fc6b 100644 > --- a/drivers/dma/sh/rcar-dmac.c > +++ b/drivers/dma/sh/rcar-dmac.c > @@ -189,7 +189,7 @@ struct rcar_dmac_chan { > * struct rcar_dmac - R-Car Gen2 DMA Controller > * @engine: base DMA engine object > * @dev: the hardware device > - * @iomem: remapped I/O memory base > + * @iomem: remapped I/O memory bases (second is optional) > * @n_channels: number of available channels > * @channels: array of DMAC channels > * @channels_mask: bitfield of which DMA channels are managed by this driver > @@ -198,7 +198,7 @@ struct rcar_dmac_chan { > struct rcar_dmac { > struct dma_device engine; > struct device *dev; > - void __iomem *iomem; > + void __iomem *iomem[2]; do you forsee many more memory regions, if not then why not add second region, that way changes in this patch will be lesser..? and it would be better to refer to a region by its name rather than iomem[1].. -- ~Vinod