Adjust this function to work with livetree.
Signed-off-by: Simon Glass <sjg@chromium.org>
int ret;
*devp = NULL;
- find_phandle = fdtdec_get_int(gd->fdt_blob, dev_of_offset(parent), name,
- -1);
+ find_phandle = dev_read_u32_default(parent, name, -1);
if (find_phandle <= 0)
return -ENOENT;
ret = uclass_get(id, &uc);
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
uint phandle;
- phandle = fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev));
+ phandle = dev_read_phandle(dev);
if (phandle == find_phandle) {
*devp = dev;