ARM: dts: sunxi: Fix dtc 'dma-ranges' warnings
authorRob Herring <robh@kernel.org>
Fri, 13 Mar 2020 15:02:54 +0000 (10:02 -0500)
committerRob Herring <robh@kernel.org>
Fri, 20 Mar 2020 03:16:20 +0000 (21:16 -0600)
'#address-cells' and '#size-cells' are needed in the same node (for the
child bus) as 'dma-ranges' in order to parse it. The kernel is more lax
and will walk up the tree to get the properties from a parent node, but
it's better to be explicit. dtc now does checks on 'dma-ranges' and is
more strict:

arch/arm/boot/dts/sun5i.dtsi:189.4-52: Warning (dma_ranges_format): \
/soc/dram-controller@1c01000:dma-ranges: "dma-ranges" property has invalid length (12 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 1)
arch/arm/boot/dts/sun8i-r40.dtsi:742.4-52: Warning (dma_ranges_format): \
/soc/dram-controller@1c62000:dma-ranges: "dma-ranges" property has invalid length (12 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 1)
arch/arm/boot/dts/sunxi-h3-h5.dtsi:563.4-52: Warning (dma_ranges_format): \
/soc/dram-controller@1c62000:dma-ranges: "dma-ranges" property has invalid length (12 bytes) (parent #address-cells == 1, child #address-cells == 2, #size-cells == 1)

Cc: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
arch/arm/boot/dts/sun5i.dtsi
arch/arm/boot/dts/sun8i-r40.dtsi
arch/arm/boot/dts/sunxi-h3-h5.dtsi

index 0b526e6e5a95b05c624bca0078627ae621e581ee..b8bb58b0180e1415cb10ee056f9a980c3c30b93d 100644 (file)
                        compatible = "allwinner,sun5i-a13-mbus";
                        reg = <0x01c01000 0x1000>;
                        clocks = <&ccu CLK_MBUS>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0x20000000>;
                        #interconnect-cells = <1>;
                };
index 8f09a24b36ec080e5823fe7768a3b4eae7722742..b9c45aa8f21fd0895c3a5e40118805dfc7eec8c9 100644 (file)
                        compatible = "allwinner,sun8i-r40-mbus";
                        reg = <0x01c62000 0x1000>;
                        clocks = <&ccu 155>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0x80000000>;
                        #interconnect-cells = <1>;
                };
index 5e9c3060aa08baed801cca8b461bd46cef60f4ea..62ca0d28700886a8c86ff687c46b8d582fe54fc7 100644 (file)
                        compatible = "allwinner,sun8i-h3-mbus";
                        reg = <0x01c62000 0x1000>;
                        clocks = <&ccu CLK_MBUS>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        dma-ranges = <0x00000000 0x40000000 0xc0000000>;
                        #interconnect-cells = <1>;
                };