| 358 | } |
| 359 | |
| 360 | const struct device_node * |
| 361 | of_find_node_by_phandle(uint64_t ph) |
| 362 | { |
| 363 | const struct dt_dir *d; |
| 364 | |
| 365 | DPAAX_HWWARN(!alive, "Device-tree driver not initialised!"); |
| 366 | list_for_each_entry(d, &linear, linear) |
| 367 | if (d->lphandle && (d->lphandle->len == 4) && |
| 368 | !memcmp(d->lphandle->buf, &ph, 4)) |
| 369 | return &d->node.node; |
| 370 | return NULL; |
| 371 | } |
| 372 | |
| 373 | const struct device_node * |
| 374 | of_get_parent(const struct device_node *dev_node) |