fdt: Add fdtdec_find_aliases() to deal with alias nodes
authorSimon Glass <sjg@chromium.org>
Tue, 17 Jan 2012 08:20:50 +0000 (08:20 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 29 Mar 2012 06:12:47 +0000 (08:12 +0200)
commita53f4a29ac62a2e83d35a4a7b6d6969cf95a5902
tree663074c62f5bf4b6268e25a5ff97e523000cd169
parentd8bd820935bb9b8bf2717a259eeab4376e9ccc9a
fdt: Add fdtdec_find_aliases() to deal with alias nodes

Stephen Warren pointed out that we should use nodes whether or not they
have an alias in the /aliases section. The aliases section specifies the
order so far as it can, but is not essential. Operating without alisses
is useful when the enumerated order of nodes does not matter (admittedly
rare in U-Boot).

This is considerably more complex, and it is important to keep this
complexity out of driver code. This patch creates a function
fdtdec_find_aliases() which returns an ordered list of node offsets
for a particular compatible ID, taking account of alias nodes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
include/fdtdec.h
lib/fdtdec.c