From patchwork Wed Oct 30 00:33:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3112571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7C4CFBF924 for ; Wed, 30 Oct 2013 00:33:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AD3C20204 for ; Wed, 30 Oct 2013 00:33:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8909920203 for ; Wed, 30 Oct 2013 00:33:51 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbJjF-0005T3-KD; Wed, 30 Oct 2013 00:33:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbJjC-0000pq-U0; Wed, 30 Oct 2013 00:33:42 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbJj9-0000ox-2V for linux-arm-kernel@lists.infradead.org; Wed, 30 Oct 2013 00:33:39 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id B9F1B856; Wed, 30 Oct 2013 01:33:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (unknown [190.2.98.212]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4128E731; Wed, 30 Oct 2013 01:33:23 +0100 (CET) Date: Tue, 29 Oct 2013 21:33:18 -0300 From: Ezequiel Garcia To: Dan Williams Subject: Re: [PATCH 2/2] dma: mv_xor: Use high_base mmio where appropriate Message-ID: <20131030003317.GD2527@localhost> References: <1383000855-8377-1-git-send-email-ezequiel.garcia@free-electrons.com> <1383000855-8377-2-git-send-email-ezequiel.garcia@free-electrons.com> <20131029083407.GA2416@localhost> <20131029103229.5e095a24@skate> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131029_203339_293873_2070FD14 X-CRM114-Status: GOOD ( 27.13 ) X-Spam-Score: -1.7 (-) Cc: Thomas Petazzoni , sachin.kamat@linaro.org, "linux-kernel@vger.kernel.org" , Vinod Koul , dmaengine@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Oct 29, 2013 at 12:15:18PM -0700, Dan Williams wrote: > On Tue, Oct 29, 2013 at 2:32 AM, Thomas Petazzoni > wrote: > > Dan, Ezequiel, > > > > On Tue, 29 Oct 2013 05:34:08 -0300, Ezequiel Garcia wrote: > > > >> > On Mon, Oct 28, 2013 at 3:54 PM, Ezequiel Garcia > >> > wrote: > >> > > Despite requesting two memory resources, called 'base' and 'high_base', the > >> > > driver uses explicitly only the former. The latter is being used implicitly > >> > > by addressing at offset +0x200, which in practice accesses high_base. > >> > > > >> > > Instead of relying in such trick, let's define the registers with the > >> > > offset from high_base, and use high_base explicitly where appropriate. > >> > > > >> > > Signed-off-by: Ezequiel Garcia > >> > > --- > >> > > drivers/dma/mv_xor.c | 3 ++- > >> > > drivers/dma/mv_xor.h | 25 +++++++++++++------------ > >> > > 2 files changed, 15 insertions(+), 13 deletions(-) > >> > > >> > Since it's unused I'd prefer a patch that just deletes xor_high_base. > >> > > >> > >> It's wrongly *unused*, the mmio high_base is actually being used > >> implicitly by always addressing at an offset that addresses +200. > >> > >> Deleting high_base would actually make it worse, for that region > >> will no longer be ioremaped. Maybe the commit message is not clear > >> about it? > > > > I agree with Ezequiel, and I believe his patch is appropriate. The > > registers for the XOR engines are indeed split in two areas, so it > > makes sense to have this xor_base / xor_high_base split that reflects > > the register mapping passed from the Device Tree, and use this split in > > the macros used to access the registers. > > > > Ah ok, so it's a bug if an implementation ever puts the second > resource window at a non 0x200 offset. > > Ezequiel , can you resend the patch to the new Sure. > dmaengine@vger.kernel.org list (patchwork queue) and clarify that this > is a fix rather than a pure cleanup in the changelog? At least > cleanup is how I first read it. > By the way, I didn't initially Cced dmaengine list because it's not in the MAINTAINERS file. How about we add it and avoid this happening to other developers? I'll submit the patch if you want. Just check the above is correct. If there's a git repo, it might be good to add is as well. diff --git a/MAINTAINERS b/MAINTAINERS index ebaf8bd..cd57b4a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1397,6 +1397,15 @@ F: drivers/dma/ F: include/linux/dmaengine.h F: include/linux/async_tx.h +DMAENGINE SUBSYSTEM +M: Dan Williams +L: dmaengine@vger.kernel.org +S: Maintained +F: Documentation/dmaengine.txt +F: drivers/dma/ +F: include/linux/dma/ +F: include/linux/dmaengine.h + AT24 EEPROM DRIVER M: Wolfram Sang L: linux-i2c@vger.kernel.org