Lines Matching +full:a +full:- +full:child +full:- +full:node +full:- +full:property

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
51 fill_slices_from_node(phandle_t node, struct flash_slice *slices, int *count) in fill_slices_from_node() argument
54 phandle_t child; in fill_slices_from_node() local
60 for (child = OF_child(node); child != 0; child = OF_peer(child)) { in fill_slices_from_node()
63 /* Nodes with a compatible property are not slices. */ in fill_slices_from_node()
64 if (OF_hasprop(child, "compatible")) in fill_slices_from_node()
73 if (fdt_regsize(child, &base, &size) != 0) { in fill_slices_from_node()
74 debugf("error during processing reg property, i=%d\n", in fill_slices_from_node()
85 nmlen = OF_getprop_alloc(child, "label", (void **)&label); in fill_slices_from_node()
87 /* Use node name if no label defined */ in fill_slices_from_node()
88 nmlen = OF_getprop_alloc(child, "name", (void **)&label); in fill_slices_from_node()
95 if (OF_hasprop(child, "read-only")) in fill_slices_from_node()
114 phandle_t child, node; in fill_slices() local
125 node = ofw_bus_get_node(dev); in fill_slices()
128 * If there is a child node whose compatible is "fixed-partitions" then in fill_slices()
129 * we have new-style data where all partitions are the children of that in fill_slices()
130 * node. Otherwise we have old-style data where all the children of the in fill_slices()
131 * device node are the partitions. in fill_slices()
133 child = fdt_find_compatible(node, "fixed-partitions", false); in fill_slices()
134 if (child == 0) in fill_slices()
135 return fill_slices_from_node(node, slices, slices_num); in fill_slices()
137 return fill_slices_from_node(child, slices, slices_num); in fill_slices()