Re: [U-Boot] [PATCH] fdt: Add function to alloc phandle values

2010-07-10 Thread Sergei Shtylyov
Hello. Kumar Gala wrote: > If we are creating reference (handles) to nodes in a device tree we need > to first create a new phandle in node and this needs a new phandle > value. So we search through the whole dtb to find the max phandle value > and return the next greater value for a new phandle

Re: [U-Boot] [PATCH] fdt: Add function to alloc phandle values

2010-07-09 Thread Timur Tabi
On Fri, Jul 9, 2010 at 4:22 PM, Kumar Gala wrote: > +int fdt_alloc_phandle(void *blob) > +{ > +       int offset, len, phandle = 0; > +       const u32 *val; > +        for (offset = fdt_next_node(blob, -1, NULL); offset >= 0; > +             offset = fdt_next_node(blob, offset, NULL)) { > +    

[U-Boot] [PATCH] fdt: Add function to alloc phandle values

2010-07-09 Thread Kumar Gala
If we are creating reference (handles) to nodes in a device tree we need to first create a new phandle in node and this needs a new phandle value. So we search through the whole dtb to find the max phandle value and return the next greater value for a new phandle allocation. Signed-off-by: Kumar