• Home
  • Raw
  • Download

Lines Matching refs:offset

77 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)  in fdt_offset_ptr()  argument
79 unsigned absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr()
81 if ((absoffset < offset) in fdt_offset_ptr()
87 if (((offset + len) < offset) in fdt_offset_ptr()
88 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr()
91 return _fdt_offset_ptr(fdt, offset); in fdt_offset_ptr()
98 int offset = startoffset; in fdt_next_tag() local
102 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE); in fdt_next_tag()
106 offset += FDT_TAGSIZE; in fdt_next_tag()
113 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag()
120 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp)); in fdt_next_tag()
124 offset += sizeof(struct fdt_property) - FDT_TAGSIZE in fdt_next_tag()
137 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset)) in fdt_next_tag()
140 *nextoffset = FDT_TAGALIGN(offset); in fdt_next_tag()
144 int _fdt_check_node_offset(const void *fdt, int offset) in _fdt_check_node_offset() argument
146 if ((offset < 0) || (offset % FDT_TAGSIZE) in _fdt_check_node_offset()
147 || (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE)) in _fdt_check_node_offset()
150 return offset; in _fdt_check_node_offset()
153 int _fdt_check_prop_offset(const void *fdt, int offset) in _fdt_check_prop_offset() argument
155 if ((offset < 0) || (offset % FDT_TAGSIZE) in _fdt_check_prop_offset()
156 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)) in _fdt_check_prop_offset()
159 return offset; in _fdt_check_prop_offset()
162 int fdt_next_node(const void *fdt, int offset, int *depth) in fdt_next_node() argument
167 if (offset >= 0) in fdt_next_node()
168 if ((nextoffset = _fdt_check_node_offset(fdt, offset)) < 0) in fdt_next_node()
172 offset = nextoffset; in fdt_next_node()
173 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_next_node()
199 return offset; in fdt_next_node()
202 int fdt_first_subnode(const void *fdt, int offset) in fdt_first_subnode() argument
206 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode()
207 if (offset < 0 || depth != 1) in fdt_first_subnode()
210 return offset; in fdt_first_subnode()
213 int fdt_next_subnode(const void *fdt, int offset) in fdt_next_subnode() argument
222 offset = fdt_next_node(fdt, offset, &depth); in fdt_next_subnode()
223 if (offset < 0 || depth < 1) in fdt_next_subnode()
227 return offset; in fdt_next_subnode()