* [PATCH] imx27: dt: only map 1 Kbyte for fec registers @ 2015-05-09 20:54 Philippe Reynes 2015-05-11 12:01 ` Shawn Guo 0 siblings, 1 reply; 5+ messages in thread From: Philippe Reynes @ 2015-05-09 20:54 UTC (permalink / raw) To: shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Philippe Reynes 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 <tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- 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>; interrupts = <50>; clocks = <&clks IMX27_CLK_FEC_IPG_GATE>, <&clks IMX27_CLK_FEC_AHB_GATE>; -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] imx27: dt: only map 1 Kbyte for fec registers 2015-05-09 20:54 [PATCH] imx27: dt: only map 1 Kbyte for fec registers Philippe Reynes @ 2015-05-11 12:01 ` Shawn Guo 2015-05-11 21:25 ` Philippe Reynes 0 siblings, 1 reply; 5+ messages in thread From: Shawn Guo @ 2015-05-11 12:01 UTC (permalink / raw) To: Philippe Reynes Cc: shawn.guo, kernel, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, linux, linux-arm-kernel, devicetree, linux-kernel 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 <tremyfr@gmail.com> > --- > 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. Shawn > interrupts = <50>; > clocks = <&clks IMX27_CLK_FEC_IPG_GATE>, > <&clks IMX27_CLK_FEC_AHB_GATE>; > -- > 1.7.4.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] imx27: dt: only map 1 Kbyte for fec registers 2015-05-11 12:01 ` Shawn Guo @ 2015-05-11 21:25 ` Philippe Reynes [not found] ` <55511E34.5040908-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Philippe Reynes @ 2015-05-11 21:25 UTC (permalink / raw) To: Shawn Guo Cc: shawn.guo-QSEj5FYQhm4dnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hi Shawn, 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<tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> --- >> 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. 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. > Shawn Regards, Philippe -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <55511E34.5040908-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] imx27: dt: only map 1 Kbyte for fec registers [not found] ` <55511E34.5040908-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2015-05-12 7:01 ` Uwe Kleine-König 2015-05-12 22:21 ` Philippe Reynes 0 siblings, 1 reply; 5+ messages in thread From: Uwe Kleine-König @ 2015-05-12 7:01 UTC (permalink / raw) To: Philippe Reynes Cc: Shawn Guo, mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-lFZ/pmaqli7XmaaqVzeoHQ, pawel.moll-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, linux-kernel-u79uwXL29TY76Z2rM5mHXA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, galak-sgV2jX0FEOL9JmXXK+q4OQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r 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<tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >>--- > >> 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/ | -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] imx27: dt: only map 1 Kbyte for fec registers 2015-05-12 7:01 ` Uwe Kleine-König @ 2015-05-12 22:21 ` Philippe Reynes 0 siblings, 0 replies; 5+ messages in thread From: Philippe Reynes @ 2015-05-12 22:21 UTC (permalink / raw) To: Uwe Kleine-König Cc: Shawn Guo, mark.rutland, devicetree, linux, pawel.moll, ijc+devicetree, linux-kernel, robh+dt, kernel, galak, shawn.guo, linux-arm-kernel Hi Uwe, On 12/05/15 09:01, Uwe Kleine-König wrote: > 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<tremyfr@gmail.com> >>>> --- >>>> 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. Ok, I understand, thanks for this explaination. >> 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. I've send a new patch (v2 and v3) that map 4 Kbyte for fec registers on imx27. > Best regards > Uwe Best regards, Philippe ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-12 22:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09 20:54 [PATCH] imx27: dt: only map 1 Kbyte for fec registers Philippe Reynes
2015-05-11 12:01 ` Shawn Guo
2015-05-11 21:25 ` Philippe Reynes
[not found] ` <55511E34.5040908-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-12 7:01 ` Uwe Kleine-König
2015-05-12 22:21 ` Philippe Reynes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).