Lines Matching refs:offset

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