Lines Matching refs:offset
143 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len) in fdt_offset_ptr() argument
145 unsigned int uoffset = offset; in fdt_offset_ptr()
146 unsigned int absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr()
148 if (offset < 0) in fdt_offset_ptr()
159 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr()
162 return fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr()
169 int offset = startoffset; in fdt_next_tag() local
173 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE); in fdt_next_tag()
177 offset += FDT_TAGSIZE; in fdt_next_tag()
184 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag()
191 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp)); in fdt_next_tag()
195 offset += sizeof(struct fdt_property) - FDT_TAGSIZE in fdt_next_tag()
199 ((offset - fdt32_to_cpu(*lenp)) % 8) != 0) in fdt_next_tag()
200 offset += 4; in fdt_next_tag()
212 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset)) in fdt_next_tag()
215 *nextoffset = FDT_TAGALIGN(offset); in fdt_next_tag()
219 int fdt_check_node_offset_(const void *fdt, int offset) in fdt_check_node_offset_() argument
222 && ((offset < 0) || (offset % FDT_TAGSIZE))) in fdt_check_node_offset_()
225 if (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE) in fdt_check_node_offset_()
228 return offset; in fdt_check_node_offset_()
231 int fdt_check_prop_offset_(const void *fdt, int offset) in fdt_check_prop_offset_() argument
234 && ((offset < 0) || (offset % FDT_TAGSIZE))) in fdt_check_prop_offset_()
237 if (fdt_next_tag(fdt, offset, &offset) != FDT_PROP) in fdt_check_prop_offset_()
240 return offset; in fdt_check_prop_offset_()
243 int fdt_next_node(const void *fdt, int offset, int *depth) in fdt_next_node() argument
248 if (offset >= 0) in fdt_next_node()
249 if ((nextoffset = fdt_check_node_offset_(fdt, offset)) < 0) in fdt_next_node()
253 offset = nextoffset; in fdt_next_node()
254 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_next_node()
280 return offset; in fdt_next_node()
283 int fdt_first_subnode(const void *fdt, int offset) in fdt_first_subnode() argument
287 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode()
288 if (offset < 0 || depth != 1) in fdt_first_subnode()
291 return offset; in fdt_first_subnode()
294 int fdt_next_subnode(const void *fdt, int offset) in fdt_next_subnode() argument
303 offset = fdt_next_node(fdt, offset, &depth); in fdt_next_subnode()
304 if (offset < 0 || depth < 1) in fdt_next_subnode()
308 return offset; in fdt_next_subnode()