- nodeoffset = fdt_path_offset (blob, "/localbus");
- if (nodeoffset >= 0) {
- ret = fdt_setprop (blob, nodeoffset, "ranges", flash_data,
- sizeof (flash_data));
- if (ret < 0)
- printf ("ft_blob_update(): cannot set /localbus/ranges "
- "property err:%s\n", fdt_strerror (ret));
- } else {
- /* memory node is required in dts */
- printf ("ft_blob_update(): cannot find /localbus node "
- "err:%s\n", fdt_strerror (nodeoffset));
- }
- /* MAC Adresse */
- nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
- if (nodeoffset >= 0) {
- ret = fdt_setprop (blob, nodeoffset, "mac-address", bd->bi_enetaddr,
- sizeof (uchar) * 6);
- if (ret < 0)
- printf ("ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
- "property err:%s\n", fdt_strerror (ret));
- } else {
- /* memory node is required in dts */
- printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node "
- "err:%s\n", fdt_strerror (nodeoffset));
- }
-
+ fdt_set_node_and_value (blob, "/localbus", "ranges", flash_data,
+ sizeof (flash_data));
+ /* MAC addr */
+ fdt_set_node_and_value (blob, "/soc/cpm/ethernet", "mac-address",
+ bd->bi_enetaddr, sizeof (u8) * 6);