Per the device-tree specific [1], when the property #address-cells
and #size-cells are not present, the default value should be resp. 1
and 2.
[1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-
20160524.pdf
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
continue;
}
- as = depth > 0 ? address_cells[depth-1] : 0;
- ss = depth > 0 ? size_cells[depth-1] : 0;
+ as = depth > 0 ? address_cells[depth-1] : DT_ROOT_NODE_ADDR_CELLS_DEFAULT;
+ ss = depth > 0 ? size_cells[depth-1] : DT_ROOT_NODE_SIZE_CELLS_DEFAULT;
address_cells[depth] = device_tree_get_u32(fdt, node,
"#address-cells", as);