Lines Matching refs:offset

13 static int fdt_nodename_eq_(const void *fdt, int offset,
17 const char *p = fdt_get_name(fdt, offset, &olen);
117 int offset = -1;
122 offset = fdt_next_node(fdt, offset, NULL);
123 if (offset < 0) {
124 if (offset == -FDT_ERR_NOTFOUND)
127 return offset;
130 value = fdt_get_phandle(fdt, offset);
162 unsigned int offset = n * sizeof(struct fdt_reserve_entry);
163 unsigned int absoffset = fdt_off_mem_rsvmap(fdt) + offset;
201 static int nextprop_(const void *fdt, int offset)
207 tag = fdt_next_tag(fdt, offset, &nextoffset);
217 return offset;
219 offset = nextoffset;
225 int fdt_subnode_offset_namelen(const void *fdt, int offset,
233 (offset >= 0) && (depth >= 0);
234 offset = fdt_next_node(fdt, offset, &depth))
236 && fdt_nodename_eq_(fdt, offset, name, namelen))
237 return offset;
241 return offset; /* error */
254 int offset = 0;
271 offset = fdt_path_offset(fdt, p);
282 return offset;
288 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
289 if (offset < 0)
290 return offset;
295 return offset;
343 int offset;
345 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0)
346 return offset;
348 return nextprop_(fdt, offset);
351 int fdt_next_property_offset(const void *fdt, int offset)
353 if ((offset = fdt_check_prop_offset_(fdt, offset)) < 0)
354 return offset;
356 return nextprop_(fdt, offset);
360 int offset,
367 (err = fdt_check_prop_offset_(fdt, offset)) < 0) {
373 prop = fdt_offset_ptr_(fdt, offset);
382 int offset,
394 return fdt_get_property_by_offset_(fdt, offset, lenp);
398 int offset,
404 for (offset = fdt_first_property_offset(fdt, offset);
405 (offset >= 0);
406 (offset = fdt_next_property_offset(fdt, offset))) {
409 prop = fdt_get_property_by_offset_(fdt, offset, lenp);
411 offset = -FDT_ERR_INTERNAL;
417 *poffset = offset;
423 *lenp = offset;
429 int offset,
441 return fdt_get_property_namelen_(fdt, offset, name, namelen, lenp,
472 const void *fdt_getprop_by_offset(const void *fdt, int offset,
477 prop = fdt_get_property_by_offset_(fdt, offset, lenp);
500 (offset + sizeof(*prop)) % 8 && fdt32_ld_(&prop->len) >= 8)
532 int offset = fdt_path_offset(fdt, path);
534 if (offset < 0)
537 return fdt_getprop_namelen(fdt, offset, propname, propnamelen, lenp);
574 int offset, depth, namelen;
582 for (offset = 0, depth = 0;
583 (offset >= 0) && (offset <= nodeoffset);
584 offset = fdt_next_node(fdt, offset, &depth)) {
593 name = fdt_get_name(fdt, offset, &namelen);
604 if (offset == nodeoffset) {
615 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
617 else if (offset == -FDT_ERR_BADOFFSET)
620 return offset; /* error from fdt_next_node() */
626 int offset, depth;
634 for (offset = 0, depth = 0;
635 (offset >= 0) && (offset <= nodeoffset);
636 offset = fdt_next_node(fdt, offset, &depth)) {
638 supernodeoffset = offset;
640 if (offset == nodeoffset) {
652 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
654 else if (offset == -FDT_ERR_BADOFFSET)
658 return offset; /* error from fdt_next_node() */
687 int offset;
698 for (offset = fdt_next_node(fdt, startoffset, NULL);
699 offset >= 0;
700 offset = fdt_next_node(fdt, offset, NULL)) {
701 val = fdt_getprop(fdt, offset, propname, &len);
704 return offset;
707 return offset; /* error from fdt_next_node() */
712 int offset;
725 for (offset = fdt_next_node(fdt, -1, NULL);
726 offset >= 0;
727 offset = fdt_next_node(fdt, offset, NULL)) {
728 if (fdt_get_phandle(fdt, offset) == phandle)
729 return offset;
732 return offset; /* error from fdt_next_node() */
868 int offset, err;
877 for (offset = fdt_next_node(fdt, startoffset, NULL);
878 offset >= 0;
879 offset = fdt_next_node(fdt, offset, NULL)) {
880 err = fdt_node_check_compatible(fdt, offset, compatible);
884 return offset;
887 return offset; /* error from fdt_next_node() */