Home | History | Annotate | Download | only in dist

Lines Matching refs:offset

116 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
118 unsigned absoffset = offset + fdt_off_dt_struct(fdt);
120 if ((absoffset < offset)
126 if (((offset + len) < offset)
127 || ((offset + len) > fdt_size_dt_struct(fdt)))
130 return fdt_offset_ptr_(fdt, offset);
137 int offset = startoffset;
141 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
145 offset += FDT_TAGSIZE;
152 p = fdt_offset_ptr(fdt, offset++, 1);
159 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
162 /* skip-name offset, length and value */
163 offset += sizeof(struct fdt_property) - FDT_TAGSIZE
166 ((offset - fdt32_to_cpu(*lenp)) % 8) != 0)
167 offset += 4;
179 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
182 *nextoffset = FDT_TAGALIGN(offset);
186 int fdt_check_node_offset_(const void *fdt, int offset)
188 if ((offset < 0) || (offset % FDT_TAGSIZE)
189 || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE))
192 return offset;
195 int fdt_check_prop_offset_(const void *fdt, int offset)
197 if ((offset < 0) || (offset % FDT_TAGSIZE)
198 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP))
201 return offset;
204 int fdt_next_node(const void *fdt, int offset, int *depth)
209 if (offset >= 0)
210 if ((nextoffset = fdt_check_node_offset_(fdt, offset)) < 0)
214 offset = nextoffset;
215 tag = fdt_next_tag(fdt, offset, &nextoffset);
241 return offset;
244 int fdt_first_subnode(const void *fdt, int offset)
248 offset = fdt_next_node(fdt, offset, &depth);
249 if (offset < 0 || depth != 1)
252 return offset;
255 int fdt_next_subnode(const void *fdt, int offset)
264 offset = fdt_next_node(fdt, offset, &depth);
265 if (offset < 0 || depth < 1)
269 return offset;