Preprocessor arithmetic in dtsi files (base + offset)
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Nov 26 05:59:57 PST 2015
On Thu, Nov 26, 2015 at 02:16:16PM +0100, Mason wrote:
> #define SCU_BASE 0x20000000
>
> scu: scu at XXX {
> compatible = "arm,cortex-a9-scu";
> reg = <SCU_BASE 0x100>;
>
> gic: interrupt-controller at XXX {
> compatible = "arm,cortex-a9-gic";
> reg = <SCU_BASE+0x1000 0x1000>, <SCU_BASE+0x100 0x0100>;
You don't get preprocessor arithmetic here. What you get is this passed
to DTC:
reg = <0x20000000+0x1000 0x1000>...
The only time the preprocessor does arithmetic is when it needs to
evaluate an expression, eg, in an #if statement.
The @XXX are part of the requirements from ePAPR, and are required to
be conformant with the spec.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel
mailing list