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>
ePAPR 1.1 section 2.2.1.1 "Node Name Requirements" specifies that any
node that has a reg property must include a unit address in its name
with value matching the first entry in its reg property. Conversely, if
a node does not have a reg property, the node name must not include a
unit address.
Adjust all the dtc test-cases to conform to this rule.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
There's currently an off-by-one bug in fdt_subnode_offset_namelen()
which causes it to keep searching after it's finished the subnodes of
the given parent, and into the subnodes of siblings of the original
node which come after it in the tree.
This patch fixes the bug. It also extends the subnode_offset testcase
(updating all of the 'test_tree1' example trees in the process) to
catch it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This patch adds a testcase for the /include/ directive. It assembles
a sample dts file with many /include/ directives at a variety of
different lexical / grammatical contexts.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>