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

2015-12-02 Thread Mason
On 26/11/2015 17:23, Geert Uytterhoeven wrote: > I guess this would work, too? > > scu_container@2000 { > compatible = "simple-bus"; > > ranges = <0x0 0x2000 0x1>; > #address-cells = <1>; > #size-cells = <1>; > > scu: scu@0 { >

Preprocessor arithmetic in dtsi files (base + offset)

2015-11-26 Thread Mason
Hello, In the device tree for my ARM platform, I have several nodes with addresses within the SCU block: scu: scu@2000 { compatible = "arm,cortex-a9-scu"; reg = <0x2000 0x100>; gic: interrupt-controller@20001000 {

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

2015-11-26 Thread Mark Rutland
On Thu, Nov 26, 2015 at 02:16:16PM +0100, Mason wrote: > Hello, > > In the device tree for my ARM platform, I have several nodes with > addresses within the SCU block: > > scu: scu@2000 { > compatible = "arm,cortex-a9-scu"; > reg = <0x2000 0x100>; > >

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

2015-11-26 Thread Russell King - ARM Linux
On Thu, Nov 26, 2015 at 02:16:16PM +0100, Mason wrote: > #define SCU_BASE 0x2000 > > scu: scu@XXX { > compatible = "arm,cortex-a9-scu"; > reg = ; > > gic: interrupt-controller@XXX { > compatible = "arm,cortex-a9-gic"; >

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

2015-11-26 Thread Mason
On 26/11/2015 14:59, Russell King - ARM Linux wrote: > On Thu, Nov 26, 2015 at 02:16:16PM +0100, Mason wrote: >> #define SCU_BASE 0x2000 >> >> scu: scu@XXX { >> compatible = "arm,cortex-a9-scu"; >> reg = ; >> >> gic: interrupt-controller@XXX { >>

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

2015-11-26 Thread Geert Uytterhoeven
On Thu, Nov 26, 2015 at 3:44 PM, Mason wrote: > On 26/11/2015 14:59, Russell King - ARM Linux wrote: >> On Thu, Nov 26, 2015 at 02:16:16PM +0100, Mason wrote: >>> #define SCU_BASE 0x2000 >>> >>> scu: scu@XXX { >>> compatible = "arm,cortex-a9-scu"; >>>

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

2015-11-26 Thread Robin Murphy
On 26/11/15 16:23, Geert Uytterhoeven wrote: [...] I guess this would work, too? scu_container@2000 { compatible = "simple-bus"; ranges = <0x0 0x2000 0x1>; #address-cells = <1>; #size-cells = <1>; scu: scu@0 {