580a9f6c28
The existing function to add a new property to a tree being built requires that the entire contents of the new property be passed in. For some applications it is more convenient to be able to add the property contents later, perhaps by reading from a file. This avoids double-buffering of the contents. Add a new function to support this and adjust the existing fdt_property() to use it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
56 lines
933 B
Text
56 lines
933 B
Text
/dts-v1/;
|
|
|
|
/memreserve/ 0xdeadbeef00000000 0x100000;
|
|
/memreserve/ 123456789 010000;
|
|
|
|
/ {
|
|
compatible = "test_tree1";
|
|
prop-int = <0xdeadbeef>;
|
|
prop-int64 = /bits/ 64 <0xdeadbeef01abcdef>;
|
|
prop-str = "hello world";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
subnode@1 {
|
|
compatible = "subnode1";
|
|
reg = <1>;
|
|
prop-int = [deadbeef];
|
|
|
|
subsubnode {
|
|
compatible = "subsubnode1", "subsubnode";
|
|
placeholder = "this is a placeholder string", "string2";
|
|
prop-int = <0xdeadbeef>;
|
|
};
|
|
|
|
ss1 {
|
|
};
|
|
};
|
|
|
|
subnode@2 {
|
|
reg = <2>;
|
|
linux,phandle = <0x2000>;
|
|
prop-int = <123456789>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
ssn0: subsubnode@0 {
|
|
phandle = <0x2001>;
|
|
prop-int = <0xbad>;
|
|
};
|
|
|
|
ss2 {
|
|
};
|
|
};
|
|
};
|
|
|
|
/* Add label to a noderef */
|
|
ssn1: &ssn0 {
|
|
reg = <0>;
|
|
prop-int = <123456789>;
|
|
};
|
|
|
|
/* Use the new label for merging */
|
|
&ssn1 {
|
|
prop-int = <0726746425>;
|
|
compatible = "subsubnode2", "subsubnode";
|
|
};
|