• Home
  • Raw
  • Download

Lines Matching refs:offset

13 static int fdt_nodename_eq_(const void *fdt, int offset,  in fdt_nodename_eq_()  argument
17 const char *p = fdt_get_name(fdt, offset, &olen); in fdt_nodename_eq_()
105 int offset = -1; in fdt_find_max_phandle() local
110 offset = fdt_next_node(fdt, offset, NULL); in fdt_find_max_phandle()
111 if (offset < 0) { in fdt_find_max_phandle()
112 if (offset == -FDT_ERR_NOTFOUND) in fdt_find_max_phandle()
115 return offset; in fdt_find_max_phandle()
118 value = fdt_get_phandle(fdt, offset); in fdt_find_max_phandle()
150 int offset = n * sizeof(struct fdt_reserve_entry); in fdt_mem_rsv() local
151 int absoffset = fdt_off_mem_rsvmap(fdt) + offset; in fdt_mem_rsv()
186 static int nextprop_(const void *fdt, int offset) in nextprop_() argument
192 tag = fdt_next_tag(fdt, offset, &nextoffset); in nextprop_()
202 return offset; in nextprop_()
204 offset = nextoffset; in nextprop_()
210 int fdt_subnode_offset_namelen(const void *fdt, int offset, in fdt_subnode_offset_namelen() argument
218 (offset >= 0) && (depth >= 0); in fdt_subnode_offset_namelen()
219 offset = fdt_next_node(fdt, offset, &depth)) in fdt_subnode_offset_namelen()
221 && fdt_nodename_eq_(fdt, offset, name, namelen)) in fdt_subnode_offset_namelen()
222 return offset; in fdt_subnode_offset_namelen()
226 return offset; /* error */ in fdt_subnode_offset_namelen()
239 int offset = 0; in fdt_path_offset_namelen() local
253 offset = fdt_path_offset(fdt, p); in fdt_path_offset_namelen()
264 return offset; in fdt_path_offset_namelen()
270 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p); in fdt_path_offset_namelen()
271 if (offset < 0) in fdt_path_offset_namelen()
272 return offset; in fdt_path_offset_namelen()
277 return offset; in fdt_path_offset_namelen()
325 int offset; in fdt_first_property_offset() local
327 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0) in fdt_first_property_offset()
328 return offset; in fdt_first_property_offset()
330 return nextprop_(fdt, offset); in fdt_first_property_offset()
333 int fdt_next_property_offset(const void *fdt, int offset) in fdt_next_property_offset() argument
335 if ((offset = fdt_check_prop_offset_(fdt, offset)) < 0) in fdt_next_property_offset()
336 return offset; in fdt_next_property_offset()
338 return nextprop_(fdt, offset); in fdt_next_property_offset()
342 int offset, in fdt_get_property_by_offset_() argument
348 if ((err = fdt_check_prop_offset_(fdt, offset)) < 0) { in fdt_get_property_by_offset_()
354 prop = fdt_offset_ptr_(fdt, offset); in fdt_get_property_by_offset_()
363 int offset, in fdt_get_property_by_offset() argument
375 return fdt_get_property_by_offset_(fdt, offset, lenp); in fdt_get_property_by_offset()
379 int offset, in fdt_get_property_namelen_() argument
385 for (offset = fdt_first_property_offset(fdt, offset); in fdt_get_property_namelen_()
386 (offset >= 0); in fdt_get_property_namelen_()
387 (offset = fdt_next_property_offset(fdt, offset))) { in fdt_get_property_namelen_()
390 if (!(prop = fdt_get_property_by_offset_(fdt, offset, lenp))) { in fdt_get_property_namelen_()
391 offset = -FDT_ERR_INTERNAL; in fdt_get_property_namelen_()
397 *poffset = offset; in fdt_get_property_namelen_()
403 *lenp = offset; in fdt_get_property_namelen_()
409 int offset, in fdt_get_property_namelen() argument
421 return fdt_get_property_namelen_(fdt, offset, name, namelen, lenp, in fdt_get_property_namelen()
452 const void *fdt_getprop_by_offset(const void *fdt, int offset, in fdt_getprop_by_offset() argument
457 prop = fdt_get_property_by_offset_(fdt, offset, lenp); in fdt_getprop_by_offset()
474 if (fdt_version(fdt) < 0x10 && (offset + sizeof(*prop)) % 8 && in fdt_getprop_by_offset()
523 int offset, depth, namelen; in fdt_get_path() local
531 for (offset = 0, depth = 0; in fdt_get_path()
532 (offset >= 0) && (offset <= nodeoffset); in fdt_get_path()
533 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_get_path()
542 name = fdt_get_name(fdt, offset, &namelen); in fdt_get_path()
553 if (offset == nodeoffset) { in fdt_get_path()
564 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_get_path()
566 else if (offset == -FDT_ERR_BADOFFSET) in fdt_get_path()
569 return offset; /* error from fdt_next_node() */ in fdt_get_path()
575 int offset, depth; in fdt_supernode_atdepth_offset() local
583 for (offset = 0, depth = 0; in fdt_supernode_atdepth_offset()
584 (offset >= 0) && (offset <= nodeoffset); in fdt_supernode_atdepth_offset()
585 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_supernode_atdepth_offset()
587 supernodeoffset = offset; in fdt_supernode_atdepth_offset()
589 if (offset == nodeoffset) { in fdt_supernode_atdepth_offset()
600 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_supernode_atdepth_offset()
602 else if (offset == -FDT_ERR_BADOFFSET) in fdt_supernode_atdepth_offset()
605 return offset; /* error from fdt_next_node() */ in fdt_supernode_atdepth_offset()
633 int offset; in fdt_node_offset_by_prop_value() local
644 for (offset = fdt_next_node(fdt, startoffset, NULL); in fdt_node_offset_by_prop_value()
645 offset >= 0; in fdt_node_offset_by_prop_value()
646 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_prop_value()
647 val = fdt_getprop(fdt, offset, propname, &len); in fdt_node_offset_by_prop_value()
650 return offset; in fdt_node_offset_by_prop_value()
653 return offset; /* error from fdt_next_node() */ in fdt_node_offset_by_prop_value()
658 int offset; in fdt_node_offset_by_phandle() local
671 for (offset = fdt_next_node(fdt, -1, NULL); in fdt_node_offset_by_phandle()
672 offset >= 0; in fdt_node_offset_by_phandle()
673 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_phandle()
674 if (fdt_get_phandle(fdt, offset) == phandle) in fdt_node_offset_by_phandle()
675 return offset; in fdt_node_offset_by_phandle()
678 return offset; /* error from fdt_next_node() */ in fdt_node_offset_by_phandle()
814 int offset, err; in fdt_node_offset_by_compatible() local
823 for (offset = fdt_next_node(fdt, startoffset, NULL); in fdt_node_offset_by_compatible()
824 offset >= 0; in fdt_node_offset_by_compatible()
825 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_compatible()
826 err = fdt_node_check_compatible(fdt, offset, compatible); in fdt_node_offset_by_compatible()
830 return offset; in fdt_node_offset_by_compatible()
833 return offset; /* error from fdt_next_node() */ in fdt_node_offset_by_compatible()
840 int offset, nextoffset = 0; in fdt_check_full() local
859 offset = nextoffset; in fdt_check_full()
860 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_check_full()
887 prop = fdt_getprop_by_offset(fdt, offset, &propname, in fdt_check_full()