powerpc/44x/fsp2: correct dtb reg property for /sdhci@020c0000

Message ID 20170715090302.23105-1-ijc@hellion.org.uk
State New
Headers show

Commit Message

Ian Campbell July 15, 2017, 9:03 a.m.
Building the split device-tree tree[0] highlighted that upstream commit
9eec6cb142bd ("powerpc/44x/fsp2: Add device tree for FSP2 board") introduced
this warning when building the device tree:

$ make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc fsp2.dtb
  CHK     scripts/mod/devicetable-offsets.h
  DTC     arch/powerpc/boot/fsp2.dtb
arch/powerpc/boot/fsp2.dtb: Warning (reg_format): "reg" property in /sdhci@020c0000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)

This commit adds the second adress cell as zeroes to resolve the warning. Note:
I have no access to or information about this platform so this is purely a
guess as to the fix. An alternative would be to adjust #address-cells, but
whether that is correct or not depends on the platform.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Ivan Mikhaylov <ivan@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/powerpc/boot/dts/fsp2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ivan Mikhaylov July 21, 2017, 12:54 p.m. | #1
Hi Ian,
>Building the split device-tree tree[0] highlighted that upstream commit
>9eec6cb142bd ("powerpc/44x/fsp2: Add device tree for FSP2 board") introduced
>this warning when building the device tree:
>
>$ make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc fsp2.dtb
>  CHK     scripts/mod/devicetable-offsets.h
>  DTC     arch/powerpc/boot/fsp2.dtb
>arch/powerpc/boot/fsp2.dtb: Warning (reg_format): "reg" property in /sdhci@020c0000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
>
>This commit adds the second adress cell as zeroes to resolve the warning. Note:
>I have no access to or information about this platform so this is purely a
>guess as to the fix. An alternative would be to adjust #address-cells, but
>whether that is correct or not depends on the platform.

Yes, this problem exists on this tag but it is already fixed and waiting for
review by this https://patchwork.kernel.org/patch/9819379/ . You can check it
if you want, anyways it will go to powerpc next branch first.

Thank you.
Ian Campbell July 21, 2017, 1 p.m. | #2
On Fri, 2017-07-21 at 15:54 +0300, Ivan Mikhaylov wrote:
> Hi Ian,
> > Building the split device-tree tree[0] highlighted that upstream commit
> > 9eec6cb142bd ("powerpc/44x/fsp2: Add device tree for FSP2 board") introduced
> > this warning when building the device tree:
> > 
> > $ make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc fsp2.dtb
> >  CHK     scripts/mod/devicetable-offsets.h
> >  DTC     arch/powerpc/boot/fsp2.dtb
> > > > arch/powerpc/boot/fsp2.dtb: Warning (reg_format): "reg" property in /sdhci@020c0000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
> > 
> > This commit adds the second adress cell as zeroes to resolve the warning. Note:
> > I have no access to or information about this platform so this is purely a
> > guess as to the fix. An alternative would be to adjust #address-cells, but
> > whether that is correct or not depends on the platform.
> 
> Yes, this problem exists on this tag but it is already fixed and waiting for
> > review by this https://patchwork.kernel.org/patch/9819379/ . You can check it
> if you want, anyways it will go to powerpc next branch first.

Great, thanks for the info.

Patch

diff --git a/arch/powerpc/boot/dts/fsp2.dts b/arch/powerpc/boot/dts/fsp2.dts
index 475953ada707..ab6d2346527f 100644
--- a/arch/powerpc/boot/dts/fsp2.dts
+++ b/arch/powerpc/boot/dts/fsp2.dts
@@ -362,7 +362,7 @@ 
 	mmc0: sdhci@020c0000 {
 		compatible	= "st,sdhci-stih407", "st,sdhci";
 		status		= "disabled";
-		reg		= <0x020c0000 0x20000>;
+		reg		= <0x00000000 0x020c0000 0x20000>;
 		reg-names	= "mmc";
 		interrupt-parent = <&UIC1_3>;
 		interrupts	= <21 0x4 22 0x4>;