[U-Boot] [RFC] fdt expert advice needed

Scott Wood
2009-01-30T21:18:32Z

Matthias Fuchs wrote:
> Now I want to replace the above code to only touch the ns16550 compatible nodes
> that are direct childs of /plb/opb. Not those under /plb/ebc and even not those under
> /plb/opb/ebc. This is not easy to do with the fdt API. Below you find my first and dirty
> hack.
>
> Isn't there a more simple way to do so? Don't bother me about the printf, variable names etc.
> It's just for discussion.

Take the node that you want to search under (/plb/opb), and pass it to
fdt_next_node(), with an initial depth of zero. Continue until depth
returns to zero (or less).

-Scott