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

Function ofw_bus_addr_cells

components/drivers/ofw/io.c:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static struct bus_ranges *_bus_ranges[RT_USING_OFW_BUS_RANGES_NUMBER] = {};
26
27static int ofw_bus_addr_cells(struct rt_ofw_node *np)
28{
29 int res = OFW_ROOT_NODE_ADDR_CELLS_DEFAULT;
30
31 for (rt_uint32_t cells; np; np = np->parent)
32 {
33 if (!rt_ofw_prop_read_u32(np, "#address-cells", &cells))
34 {
35 res = cells;
36 break;
37 }
38 }
39
40 return res;
41}
42
43static int ofw_bus_size_cells(struct rt_ofw_node *np)
44{

Callers 2

rt_ofw_bus_addr_cellsFunction · 0.85
rt_ofw_io_addr_cellsFunction · 0.85

Calls 1

rt_ofw_prop_read_u32Function · 0.85

Tested by

no test coverage detected