Go to file
David Gibson d2a9da0458 libfdt: Make unit address optional for finding nodes
At present, the fdt_subnode_offset() and fdt_path_offset() functions
in libfdt require the exact name of the nodes in question be passed,
including unit address.

This is contrary to traditional OF-like finddevice() behaviour, which
allows the unit address to be omitted (which is useful when the device
name is unambiguous without the address).

This patch introduces similar behaviour to
fdt_subnode_offset_namelen(), and hence to fdt_subnode_offset() and
fdt_path_offset() which are implemented in terms of the former.  The
unit address can be omitted from the given node name.  If this is
ambiguous, the first such node in the flattened tree will be selected
(this behaviour is consistent with IEEE1275 which specifies only that
an arbitrary node matching the given information be selected).

This very small change is then followed by many more diffs which
change the test examples and testcases to exercise this behaviour.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-10-15 08:27:24 -05:00
Documentation dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
libfdt libfdt: Make unit address optional for finding nodes 2007-10-15 08:27:24 -05:00
scripts Add DTC release version information. 2007-07-07 13:52:25 -05:00
tests libfdt: Make unit address optional for finding nodes 2007-10-15 08:27:24 -05:00
.gitignore Merge libfdt into dtc. 2007-06-14 15:05:55 +10:00
GPL dtc: Remove redundant copy of the GPL 2007-06-25 21:43:11 -05:00
Makefile dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
TODO Update TODO 2005-10-19 16:29:52 +10:00
comment-test.dts Initial label support. Also switch to glr-parser mode and get rid of 2005-06-16 14:36:37 +10:00
data.c dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
dtc-lexer.l dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
dtc-parser.y dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
dtc.c dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
dtc.h dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
flattree.c dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
fstree.c dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
ftdump.c dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
livetree.c dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
srcpos.c DTC: Add support for a C-like #include "file" mechanism. 2007-03-26 08:36:07 -05:00
srcpos.h dtc: move declaration of yyerror 2007-07-07 10:07:27 -05:00
treesource.c dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00