Device Tree Functional Enhancements
Jon Loeliger
jdl at freescale.com
Fri Jul 25 04:46:28 EST 2008
Guys,
I've been discussing some functional enhancements to
the DTS syntax and functionality with some folks at
Freescale already. Here is a brief summary of one
proposal to add a templating macro-like ability.
I wrote:
Let's pretend for a moment that "macro support" is just a little
bit vague still. At the risk of sounding too Agile, give me an
example Use Case with solution.
And Scott replied with this example:
OK, a use case for defining CPU nodes:
/define/ e500-cpu(int num) {
cpu@\num {
device_type = "cpu";
compatible = "fsl,e500mc";
reg = <\num>;
...
/if/ \num == 0 {
status = "okay";
} /else/ {
status = "disabled";
enable-method = "spin-table";
}
};
}
/for/ i /in/ 0..7 {
e500-cpu(\i);
}
And I very much agree with his example as it agreed
very much in large part with my notions in the first place.
Other comments?
jdl
More information about the devicetree-discuss
mailing list