MCPcopy Create free account
hub / github.com/F-Stack/f-stack / of_n_addr_cells

Function of_n_addr_cells

dpdk/drivers/common/dpaax/dpaa_of.c:417–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417uint32_t
418of_n_addr_cells(const struct device_node *dev_node)
419{
420 const struct dt_dir *d;
421
422 DPAAX_HWWARN(!alive, "Device-tree driver not initialised");
423 if (!dev_node)
424 return OF_DEFAULT_NA;
425 d = node2dir(dev_node);
426 while ((d = d->parent))
427 if (d->a_cells) {
428 unsigned char *buf =
429 (unsigned char *)&d->a_cells->buf[0];
430 assert(d->a_cells->len == 4);
431 return ((uint32_t)buf[0] << 24) |
432 ((uint32_t)buf[1] << 16) |
433 ((uint32_t)buf[2] << 8) |
434 (uint32_t)buf[3];
435 }
436 return OF_DEFAULT_NA;
437}
438
439uint32_t
440of_n_size_cells(const struct device_node *dev_node)

Callers 3

of_get_addressFunction · 0.85
of_translate_addressFunction · 0.85
fman_if_initFunction · 0.85

Calls 1

node2dirFunction · 0.85

Tested by

no test coverage detected