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;
268 offset = fdt_path_offset(fdt, p);
279 return offset;
285 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
286 if (offset < 0)
287 return offset;
292 return offset;
340 int offset;
342 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0)
343 return offset;
345 return nextprop_(fdt, offset);
348 int fdt_next_property_offset(const void *fdt, int offset)
350 if ((offset = fdt_check_prop_offset_(fdt, offset)) < 0)
351 return offset;
353 return nextprop_(fdt, offset);
357 int offset,
364 (err = fdt_check_prop_offset_(fdt, offset)) < 0) {
370 prop = fdt_offset_ptr_(fdt, offset);
379 int offset,
391 return fdt_get_property_by_offset_(fdt, offset, lenp);
395 int offset,
401 for (offset = fdt_first_property_offset(fdt, offset);
402 (offset >= 0);
403 (offset = fdt_next_property_offset(fdt, offset))) {
406 prop = fdt_get_property_by_offset_(fdt, offset, lenp);
408 offset = -FDT_ERR_INTERNAL;
414 *poffset = offset;
420 *lenp = offset;
426 int offset,
438 return fdt_get_property_namelen_(fdt, offset, name, namelen, lenp,
469 const void *fdt_getprop_by_offset(const void *fdt, int offset,
474 prop = fdt_get_property_by_offset_(fdt, offset, lenp);
497 (offset + sizeof(*prop)) % 8 && fdt32_ld_(&prop->len) >= 8)
545 int offset, depth, namelen;
553 for (offset = 0, depth = 0;
554 (offset >= 0) && (offset <= nodeoffset);
555 offset = fdt_next_node(fdt, offset, &depth)) {
564 name = fdt_get_name(fdt, offset, &namelen);
575 if (offset == nodeoffset) {
586 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
588 else if (offset == -FDT_ERR_BADOFFSET)
591 return offset; /* error from fdt_next_node() */
597 int offset, depth;
605 for (offset = 0, depth = 0;
606 (offset >= 0) && (offset <= nodeoffset);
607 offset = fdt_next_node(fdt, offset, &depth)) {
609 supernodeoffset = offset;
611 if (offset == nodeoffset) {
623 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0))
625 else if (offset == -FDT_ERR_BADOFFSET)
629 return offset; /* error from fdt_next_node() */
658 int offset;
669 for (offset = fdt_next_node(fdt, startoffset, NULL);
670 offset >= 0;
671 offset = fdt_next_node(fdt, offset, NULL)) {
672 val = fdt_getprop(fdt, offset, propname, &len);
675 return offset;
678 return offset; /* error from fdt_next_node() */
683 int offset;
696 for (offset = fdt_next_node(fdt, -1, NULL);
697 offset >= 0;
698 offset = fdt_next_node(fdt, offset, NULL)) {
699 if (fdt_get_phandle(fdt, offset) == phandle)
700 return offset;
703 return offset; /* error from fdt_next_node() */
839 int offset, err;
848 for (offset = fdt_next_node(fdt, startoffset, NULL);
849 offset >= 0;
850 offset = fdt_next_node(fdt, offset, NULL)) {
851 err = fdt_node_check_compatible(fdt, offset, compatible);
855 return offset;
858 return offset; /* error from fdt_next_node() */