Re: Preprocessor arithmetic in dtsi files (base + offset)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 26/11/15 16:23, Geert Uytterhoeven wrote:
[...]
I guess this would work, too?

scu_container@20000000 {
         compatible = "simple-bus";

         ranges = <0x0 0x20000000 0x10000>;
         #address-cells = <1>;
         #size-cells = <1>;

         scu: scu@0 {
                 compatible = "arm,cortex-a9-scu";
                 reg = <0x0000 0x100>;

         gic: interrupt-controller@1000 {
                 compatible = "arm,cortex-a9-gic";
                 reg = <0x1000 0x1000>, <0x0100 0x0100>;

         twd-timer@0600 {
                 compatible = "arm,cortex-a9-twd-timer";
                 reg = <0x0600 0x10>;
};

No more explicit arithmetic needed, just substitue "20000000".

Which, funnily enough, ends up looking an awful lot like the definition in the hardware documentation[1] too ;)

Robin.

[1]:http://infocenter.arm.com/help/topic/com.arm.doc.ddi0407i/CACCJFCJ.html

Gr{oetje,eeting}s,

                         Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                 -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux