/* find or create "/memory" node. */
nodeoffset = fdt_find_or_add_subnode(blob, 0, "memory");
if (nodeoffset < 0)
- return nodeoffset;
+ return nodeoffset;
err = fdt_setprop(blob, nodeoffset, "device_type", "memory",
sizeof("memory"));
goto bail;
bus = of_match_bus(blob, parent);
- /* Cound address cells & copy address locally */
+ /* Count address cells & copy address locally */
bus->count_cells(blob, parent, &na, &ns);
if (!OF_CHECK_COUNTS(na, ns)) {
- printf("%s: Bad cell count for %s\n", __FUNCTION__,
- fdt_get_name(blob, node_offset, NULL));
+ printf("%s: Bad cell count #address-cells=%d #size-cells=%d for %s\n", __FUNCTION__,
+ na, ns, fdt_get_name(blob, node_offset, NULL));
goto bail;
}
memcpy(addr, in_addr, na * 4);
pbus = of_match_bus(blob, parent);
pbus->count_cells(blob, parent, &pna, &pns);
if (!OF_CHECK_COUNTS(pna, pns)) {
- printf("%s: Bad cell count for %s\n", __FUNCTION__,
- fdt_get_name(blob, node_offset, NULL));
+ printf("%s: Bad cell count #address-cells=%d #size-cells=%d for %s\n", __FUNCTION__,
+ pna, pns, fdt_get_name(blob, node_offset, NULL));
break;
}