Lines Matching refs:offset

132 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)  in fdt_offset_ptr()  argument
134 unsigned int uoffset = offset; in fdt_offset_ptr()
135 unsigned int absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr()
137 if (offset < 0) in fdt_offset_ptr()
148 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr()
151 return fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr()
158 int offset = startoffset; in fdt_next_tag() local
162 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE); in fdt_next_tag()
166 offset += FDT_TAGSIZE; in fdt_next_tag()
173 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag()
180 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp)); in fdt_next_tag()
184 offset += sizeof(struct fdt_property) - FDT_TAGSIZE in fdt_next_tag()
188 ((offset - fdt32_to_cpu(*lenp)) % 8) != 0) in fdt_next_tag()
189 offset += 4; in fdt_next_tag()
202 !fdt_offset_ptr(fdt, startoffset, offset - startoffset)) in fdt_next_tag()
205 *nextoffset = FDT_TAGALIGN(offset); in fdt_next_tag()
209 int fdt_check_node_offset_(const void *fdt, int offset) in fdt_check_node_offset_() argument
211 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_node_offset_()
212 || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE)) in fdt_check_node_offset_()
215 return offset; in fdt_check_node_offset_()
218 int fdt_check_prop_offset_(const void *fdt, int offset) in fdt_check_prop_offset_() argument
220 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_prop_offset_()
221 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)) in fdt_check_prop_offset_()
224 return offset; in fdt_check_prop_offset_()
227 int fdt_next_node(const void *fdt, int offset, int *depth) in fdt_next_node() argument
232 if (offset >= 0) in fdt_next_node()
233 if ((nextoffset = fdt_check_node_offset_(fdt, offset)) < 0) in fdt_next_node()
237 offset = nextoffset; in fdt_next_node()
238 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_next_node()
264 return offset; in fdt_next_node()
267 int fdt_first_subnode(const void *fdt, int offset) in fdt_first_subnode() argument
271 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode()
272 if (offset < 0 || depth != 1) in fdt_first_subnode()
275 return offset; in fdt_first_subnode()
278 int fdt_next_subnode(const void *fdt, int offset) in fdt_next_subnode() argument
287 offset = fdt_next_node(fdt, offset, &depth); in fdt_next_subnode()
288 if (offset < 0 || depth < 1) in fdt_next_subnode()
292 return offset; in fdt_next_subnode()