Lines Matching refs:offset
15 static int fdt_nodename_eq_(const void *fdt, int offset,
19 const char *p = fdt_get_name(fdt, offset, &olen);
108 int offset = -1;
113 offset = fdt_next_node(fdt, offset, NULL);
114 if (offset < 0) {
115 if (offset == -FDT_ERR_NOTFOUND)
118 return offset;
121 value = fdt_get_phandle(fdt, offset);
153 int offset = n * sizeof(struct fdt_reserve_entry);
154 int absoffset = fdt_off_mem_rsvmap(fdt) + offset;
189 static int nextprop_(const void *fdt, int offset)
195 tag = fdt_next_tag(fdt, offset, &nextoffset);
205 return offset;
207 offset = nextoffset;
213 int fdt_subnode_offset_namelen(const void *fdt, int offset,
221 (offset >= 0) && (depth >= 0);
222 offset = fdt_next_node(fdt, offset, &depth))
224 && fdt_nodename_eq_(fdt, offset, name, namelen))
225 return offset;
229 return offset; /* error */
242 int offset = 0;
256 offset = fdt_path_offset(fdt, p);
267 return offset;
273 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
274 if (offset < 0)
275 return offset;
280 return offset;
328 int offset;
330 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0)
331 return offset;
333 return nextprop_(fdt, offset);
336 int fdt_next_property_offset(const void *fdt, int offset)
338 if ((offset = fdt_check_prop_offset_(fdt, offset)) < 0)
339 return offset;
341 return nextprop_(fdt, offset);
345 int offset,
351 if ((err = fdt_check_prop_offset_(fdt, offset)) < 0) {
357 prop = fdt_offset_ptr_(fdt, offset);
366 int offset,
378 return fdt_get_property_by_offset_(fdt, offset, lenp);
382 int offset,
388 for (offset = fdt_first_property_offset(fdt, offset);
389 (offset >= 0);
390 (offset = fdt_next_property_offset(fdt, offset))) {
393 if (!(prop = fdt_get_property_by_offset_(fdt, offset, lenp))) {
394 offset = -FDT_ERR_INTERNAL;
400 *poffset = offset;
406 *lenp = offset;
412 int offset,
424 return fdt_get_property_namelen_(fdt, offset, name, namelen, lenp,
455 const void *fdt_getprop_by_offset(const void *fdt, int offset,
460 prop = fdt_get_property_by_offset_(fdt, offset, lenp);
477 if (fdt_version(fdt) < 0x10 && (offset + sizeof(*prop)) % 8 &&
526 int offset, depth, namelen;
534 for (offset = 0, depth = 0;
535 (offset >= 0) && (offset <= nodeoffset);
536 offset = fdt_next_node(fdt, offset, &depth)) {
545 name = fdt_get_name(fdt, offset, &namelen);
556 if (offset == nodeoffset) {
567 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
569 else if (offset == -FDT_ERR_BADOFFSET)
572 return offset; /* error from fdt_next_node() */
578 int offset, depth;
586 for (offset = 0, depth = 0;
587 (offset >= 0) && (offset <= nodeoffset);
588 offset = fdt_next_node(fdt, offset, &depth)) {
590 supernodeoffset = offset;
592 if (offset == nodeoffset) {
603 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
605 else if (offset == -FDT_ERR_BADOFFSET)
608 return offset; /* error from fdt_next_node() */
636 int offset;
647 for (offset = fdt_next_node(fdt, startoffset, NULL);
648 offset >= 0;
649 offset = fdt_next_node(fdt, offset, NULL)) {
650 val = fdt_getprop(fdt, offset, propname, &len);
653 return offset;
656 return offset; /* error from fdt_next_node() */
661 int offset;
674 for (offset = fdt_next_node(fdt, -1, NULL);
675 offset >= 0;
676 offset = fdt_next_node(fdt, offset, NULL)) {
677 if (fdt_get_phandle(fdt, offset) == phandle)
678 return offset;
681 return offset; /* error from fdt_next_node() */
817 int offset, err;
826 for (offset = fdt_next_node(fdt, startoffset, NULL);
827 offset >= 0;
828 offset = fdt_next_node(fdt, offset, NULL)) {
829 err = fdt_node_check_compatible(fdt, offset, compatible);
833 return offset;
836 return offset; /* error from fdt_next_node() */
843 int offset, nextoffset = 0;
862 offset = nextoffset;
863 tag = fdt_next_tag(fdt, offset, &nextoffset);
890 prop = fdt_getprop_by_offset(fdt, offset, &propname,