Commit graph

4 commits

Author SHA1 Message Date
Simon Glass
580a9f6c28 Add a libfdt function to write a property placeholder
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>
2017-04-02 13:38:46 +10:00
Stephen Warren
b290428d71 Ensure all tests have matching reg and unit address
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>
2013-09-20 08:49:31 +10:00
David Gibson
f99cd158a9 libfdt: Fix bug in fdt_subnode_offset_namelen()
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>
2008-11-05 08:12:10 -06:00
David Gibson
f8e52fe6d8 dtc: Testcase for /include/ directive
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>
2008-07-14 12:07:14 -05:00