MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ofw_bus_size_cells

Function ofw_bus_size_cells

components/drivers/ofw/io.c:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static int ofw_bus_size_cells(struct rt_ofw_node *np)
44{
45 int res = OFW_ROOT_NODE_SIZE_CELLS_DEFAULT;
46
47 for (rt_uint32_t cells; np; np = np->parent)
48 {
49 if (!rt_ofw_prop_read_u32(np, "#size-cells", &cells))
50 {
51 res = cells;
52 break;
53 }
54 }
55
56 return res;
57}
58
59int rt_ofw_bus_addr_cells(struct rt_ofw_node *np)
60{

Callers 2

rt_ofw_bus_size_cellsFunction · 0.85
rt_ofw_io_size_cellsFunction · 0.85

Calls 1

rt_ofw_prop_read_u32Function · 0.85

Tested by

no test coverage detected