Lines Matching refs:offset
77 const void *fdt_offset_ptr(const void *fdt, int offset, int len)
82 if (((offset + len) < offset)
83 || ((offset + len) > fdt_size_dt_struct(fdt)))
86 p = _fdt_offset_ptr(fdt, offset);
93 uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset)
99 if (offset % FDT_TAGSIZE)
102 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
106 offset += FDT_TAGSIZE;
112 p = fdt_offset_ptr(fdt, offset++, 1);
118 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
121 /* skip name offset, length and value */
122 offset += 2*FDT_TAGSIZE + fdt32_to_cpu(*lenp);
127 *nextoffset = FDT_TAGALIGN(offset);
132 int _fdt_check_node_offset(const void *fdt, int offset)
134 if ((offset < 0) || (offset % FDT_TAGSIZE)
135 || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE))
138 return offset;
141 int fdt_next_node(const void *fdt, int offset, int *depth)
146 if (offset >= 0)
147 if ((nextoffset = _fdt_check_node_offset(fdt, offset)) < 0)
151 offset = nextoffset;
152 tag = fdt_next_tag(fdt, offset, &nextoffset);
177 return offset;