| 41 | } |
| 42 | |
| 43 | static 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 | |
| 59 | int rt_ofw_bus_addr_cells(struct rt_ofw_node *np) |
| 60 | { |
no test coverage detected