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