From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752839AbbELHBj (ORCPT ); Tue, 12 May 2015 03:01:39 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:50467 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbbELHBg (ORCPT ); Tue, 12 May 2015 03:01:36 -0400 Date: Tue, 12 May 2015 09:01:17 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Philippe Reynes Cc: Shawn Guo , mark.rutland@arm.com, devicetree@vger.kernel.org, linux@arm.linux.org.uk, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, linux-kernel@vger.kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, galak@codeaurora.org, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] imx27: dt: only map 1 Kbyte for fec registers Message-ID: <20150512070117.GV12671@pengutronix.de> References: <1431204870-17233-1-git-send-email-tremyfr@gmail.com> <20150511120101.GA25495@tiger> <55511E34.5040908@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55511E34.5040908@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, May 11, 2015 at 11:25:08PM +0200, Philippe Reynes wrote: > On 11/05/15 14:01, Shawn Guo wrote: > >On Sat, May 09, 2015 at 10:54:30PM +0200, Philippe Reynes wrote: > >>According to the imx27 documentation, fec has a 1 Kbyte > >>memory space map, spitted in two regions of 512 bytes. > >>The first one for control/status registers, and the > >>second one for event/statistic registers. So, we don't > >>need to map 16 Kbyte for registers, 1 Kbyte is enough. > >> > >>Signed-off-by: Philippe Reynes > >>--- > >> arch/arm/boot/dts/imx27.dtsi | 2 +- > >> 1 files changed, 1 insertions(+), 1 deletions(-) > >> > >>diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi > >>index 6951b66..56bb917 100644 > >>--- a/arch/arm/boot/dts/imx27.dtsi > >>+++ b/arch/arm/boot/dts/imx27.dtsi > >>@@ -533,7 +533,7 @@ > >> > >> fec: ethernet@1002b000 { > >> compatible = "fsl,imx27-fec"; > >>- reg =<0x1002b000 0x4000>; > >>+ reg =<0x1002b000 0x400>; > > > >No. Per MCIMX27RM.pdf, Table 2-7. AIPI2 Memory Map, it should be 4KiB. > > I agree, this table show that 4KiB is reserved for fec registers. > But, in paragraph 29.6.1, there is : > "The FEC implementation requires a 1-Kbyte memory map space" > So I've thought that 1 Kbye is enough for the register memory space. The table 2-7 suggests that 4 KiB are routed to the fec even though the fec module might only make use of the first 1 KiB. That's no contradiction. The convention used in the device trees is that the first amount is used. > I'm pleased to understand that we're both agree that 16 Kbyte is too large. > > If you prefer 4 Kbyte, I'll send a v2 of this patch with this value. Yes please. In the commit log you might want to point out that a length of 16 KiB overlaps with the (currently unused?) Security Controller (SCC) of the i.MX27. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |