Lines Matching refs:offset
135 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
137 unsigned int uoffset = offset;
138 unsigned int absoffset = offset + fdt_off_dt_struct(fdt);
140 if (offset < 0)
151 || ((offset + len) > fdt_size_dt_struct(fdt)))
154 return fdt_offset_ptr_(fdt, offset);
161 int offset = startoffset;
165 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
169 offset += FDT_TAGSIZE;
176 p = fdt_offset_ptr(fdt, offset++, 1);
183 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
186 /* skip-name offset, length and value */
187 offset += sizeof(struct fdt_property) - FDT_TAGSIZE
191 ((offset - fdt32_to_cpu(*lenp)) % 8) != 0)
192 offset += 4;
204 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
207 *nextoffset = FDT_TAGALIGN(offset);
211 int fdt_check_node_offset_(const void *fdt, int offset)
214 && ((offset < 0) || (offset % FDT_TAGSIZE)))
217 if (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE)
220 return offset;
223 int fdt_check_prop_offset_(const void *fdt, int offset)
226 && ((offset < 0) || (offset % FDT_TAGSIZE)))
229 if (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)
232 return offset;
235 int fdt_next_node(const void *fdt, int offset, int *depth)
240 if (offset >= 0)
241 if ((nextoffset = fdt_check_node_offset_(fdt, offset)) < 0)
245 offset = nextoffset;
246 tag = fdt_next_tag(fdt, offset, &nextoffset);
272 return offset;
275 int fdt_first_subnode(const void *fdt, int offset)
279 offset = fdt_next_node(fdt, offset, &depth);
280 if (offset < 0 || depth != 1)
283 return offset;
286 int fdt_next_subnode(const void *fdt, int offset)
295 offset = fdt_next_node(fdt, offset, &depth);
296 if (offset < 0 || depth < 1)
300 return offset;