DTC compile error (simple-bus unit address format error for #address-cells = <2> case)

Chan Kim ckim at etri.re.kr
Wed Oct 27 05:44:53 EDT 2021


Hello all,

Below is a part of arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi in linux
kernel. This file is included by arch/arm64/boot/dts/arm/fvp-base-revc.dts.


 

/ {

    smb at 8000000 {

        motherboard {

            arm,v2m-memory-map = "rs1";

            compatible = "arm,vexpress,v2m-p1", "simple-bus";

            #address-cells = <2>; /* SMB chipselect number and offset */

            #size-cells = <1>;

            #interrupt-cells = <1>;

            ranges;

 

            flash at 0,00000000 {

                compatible = "arm,vexpress-flash", "cfi-flash";

                reg = <0 0x00000000 0x04000000>,

                      <4 0x00000000 0x04000000>;

                bank-width = <4>;

            };

 

            ethernet at 2,02000000 {

                compatible = "smsc,lan91c111";

                reg = <2 0x02000000 0x10000>;

                interrupts = <15>;

            };

 

When I compile the fvp-base-revc.dts file 

(following this method to handle pre-processing :
https://stackoverflow.com/questions/50658326/device-tree-compiler-not-recogn
izes-c-syntax-for-include-files), it gives me error below.

 

arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:20.21-25.6: Warning
(simple_bus_reg): /smb at 8000000/motherboard/flash at 0,00000000: simple-bus unit
address format error, expected "0"

arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:27.24-31.6: Warning
(simple_bus_reg): /smb at 8000000/motherboard/ethernet at 2,02000000: simple-bus
unit address format error, expected "202000000"

 

The dtc is complaining about the address format `flash at 0,00000000` or
`ethernet at 2,02000000`. 

But because the #address-cells = <2>, the node address should be given by
chip select number and the offset (inside the chip select). 

How can I prevent this error? DTC version is 1.5.0.

 

Any help will be appreciated.

Thank you!

Chan Kim

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20211027/e54a99d9/attachment.html>


More information about the Kernelnewbies mailing list