imx27: dt: only map 1 Kbyte for fec registers
Subsystems (2)
PATCH 1/1 imx27: dt: only map 1 Kbyte for fec registers
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.
--- arch/arm/boot/dts/imx27.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/boot/dts/imx27.dtsi +1 -1
@@ -533,7 +533,7 @@ fec: ethernet at 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>;
Signature · 1 line
1.7.4.4
Quoted 16 lines · 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 <[email protected]>--- arch/arm/boot/dts/imx27.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx27.dtsi +0
-0
arch/arm/boot/dts/imx27.dtsi line 536
Quoted 5 lines
arch/arm/boot/dts/imx27.dtsi +1
-1@@ -533,7 +533,7 @@ fec: ethernet at 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
Quoted 11 lines
arch/arm/boot/dts/imx27.dtsi +0
-0interrupts = <50>; clocks = <&clks IMX27_CLK_FEC_IPG_GATE>, <&clks IMX27_CLK_FEC_AHB_GATE>;Signature · 7 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Hi Shawn,
Quoted 18 lines · Shawn Guo
Quoted 17 lines · 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<[email protected]>--- arch/arm/boot/dts/imx27.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx27.dtsi +0
-0@@ -533,7 +533,7 @@
Quoted 6 lines
arch/arm/boot/dts/imx27.dtsi
Quoted 4 lines
arch/arm/boot/dts/imx27.dtsi +1
-1fec: ethernet at 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.
Quoted 1 line
Shawn
Regards,
Philippe
Hello,
Quoted 26 lines · Philippe Reynes
Quoted 18 lines · Shawn Guo
Quoted 17 lines · 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<[email protected]>--- arch/arm/boot/dts/imx27.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx27.dtsi +0
-0@@ -533,7 +533,7 @@Quoted 6 lines
arch/arm/boot/dts/imx27.dtsi
Quoted 4 lines
arch/arm/boot/dts/imx27.dtsi +1
-1fec: ethernet at 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.
Quoted 4 lines
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.
Quoted 3 lines
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
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Hi Uwe,
Quoted 29 lines · Uwe Kleine-K?nig
Hello,
Quoted 26 lines · Philippe Reynes
Quoted 24 lines · Shawn Guo
Quoted 16 lines · 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<[email protected]>--- arch/arm/boot/dts/imx27.dtsi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx27.dtsi +0
-0arch/arm/boot/dts/imx27.dtsi line 536
Quoted 5 lines
arch/arm/boot/dts/imx27.dtsi +1
-1@@ -533,7 +533,7 @@ fec: ethernet at 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.
Quoted 8 lines
Quoted 4 lines
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.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 2 lines
Best regards
Uwe
Best regards,
Philippe