Lines Matching +full:rc +full:- +full:map +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0+
6 * Copyright (C) 1996-2005 Paul Mackerras.
59 bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq() argument
67 node_name = kbasename(np->full_name); in of_node_name_eq()
68 len = strchrnul(node_name, '@') - node_name; in of_node_name_eq()
70 return (strlen(name) == len) && (strncmp(node_name, name, len) == 0); in of_node_name_eq()
79 return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0; in of_node_name_prefix()
99 for (; np; np = np->parent) { in of_bus_n_addr_cells()
100 if (!of_property_read_u32(np, "#address-cells", &cells)) in of_bus_n_addr_cells()
103 * Default root value and walking parent nodes for "#address-cells" in of_bus_n_addr_cells()
108 "Missing '#address-cells' in %pOF\n", np); in of_bus_n_addr_cells()
115 if (np->parent) in of_n_addr_cells()
116 np = np->parent; in of_n_addr_cells()
126 for (; np; np = np->parent) { in of_bus_n_size_cells()
127 if (!of_property_read_u32(np, "#size-cells", &cells)) in of_bus_n_size_cells()
130 * Default root value and walking parent nodes for "#size-cells" in of_bus_n_size_cells()
135 "Missing '#size-cells' in %pOF\n", np); in of_bus_n_size_cells()
142 if (np->parent) in of_n_size_cells()
143 np = np->parent; in of_n_size_cells()
180 if (np && handle == np->phandle) in __of_phandle_cache_inv_entry()
200 if (np->phandle && !phandle_cache[of_phandle_cache_hash(np->phandle)]) in of_core_init()
201 phandle_cache[of_phandle_cache_hash(np->phandle)] = np; in of_core_init()
207 proc_symlink("device-tree", NULL, "/sys/firmware/devicetree/base"); in of_core_init()
211 const char *name, int *lenp) in __of_find_property() argument
218 for (pp = np->properties; pp; pp = pp->next) { in __of_find_property()
219 if (of_prop_cmp(pp->name, name) == 0) { in __of_find_property()
221 *lenp = pp->length; in __of_find_property()
230 const char *name, in of_find_property() argument
237 pp = __of_find_property(np, name, lenp); in of_find_property()
249 } else if (prev->child) { in __of_find_all_nodes()
250 np = prev->child; in __of_find_all_nodes()
254 while (np->parent && !np->sibling) in __of_find_all_nodes()
255 np = np->parent; in __of_find_all_nodes()
256 np = np->sibling; /* Might be null at the end of the tree */ in __of_find_all_nodes()
262 * of_find_all_nodes - Get next node in global list
284 * Find a property with a given name for a given node
288 const char *name, int *lenp) in __of_get_property() argument
290 const struct property *pp = __of_find_property(np, name, lenp); in __of_get_property()
292 return pp ? pp->value : NULL; in __of_get_property()
296 * Find a property with a given name for a given node
299 const void *of_get_property(const struct device_node *np, const char *name, in of_get_property() argument
302 const struct property *pp = of_find_property(np, name, lenp); in of_get_property()
304 return pp ? pp->value : NULL; in of_get_property()
309 * __of_device_is_compatible() - Check if the node matches given constraints
313 * @name: required node name, NULL or "" for any match
315 * Checks if the given @compat, @type and @name strings match the
323 * name. Practically speaking, this results in the following priority
326 * 1. specific compatible && type && name
328 * 3. specific compatible && name
330 * 5. general compatible && type && name
332 * 7. general compatible && name
334 * 9. type && name
336 * 11. name
339 const char *compat, const char *type, const char *name) in __of_device_is_compatible() argument
351 score = INT_MAX/2 - (index << 2); in __of_device_is_compatible()
359 /* Matching type is better than matching name */ in __of_device_is_compatible()
366 /* Matching name is a bit better than not */ in __of_device_is_compatible()
367 if (name && name[0]) { in __of_device_is_compatible()
368 if (!of_node_name_eq(device, name)) in __of_device_is_compatible()
416 * of_machine_compatible_match - Test root of device tree against a compatible array
425 int rc = 0; in of_machine_compatible_match() local
429 rc = of_device_compatible_match(root, compats); in of_machine_compatible_match()
433 return rc != 0; in of_machine_compatible_match()
454 if ((*strings)[len - 1] == '-') { in __of_device_is_status()
469 * __of_device_is_available - check if a device is available for use
488 * __of_device_is_reserved - check if a device is reserved
502 * of_device_is_available - check if a device is available for use
523 * __of_device_is_fail - check if a device has status "fail" or "fail-..."
527 * Return: True if the status property is set to "fail" or "fail-..." (for any
532 static const char * const fail[] = {"fail", "fail-", NULL}; in __of_device_is_fail()
538 * of_device_is_big_endian - check if a device has BE registers
542 * Return: True if the device has a "big-endian" property, or if the kernel
543 * was compiled for BE *and* the device has a "native-endian" property.
551 if (of_property_read_bool(device, "big-endian")) in of_device_is_big_endian()
554 of_property_read_bool(device, "native-endian")) in of_device_is_big_endian()
561 * of_get_parent - Get a node's parent if any
576 np = of_node_get(node->parent); in of_get_parent()
583 * of_get_next_parent - Iterate to a node's parent
602 parent = of_node_get(node->parent); in of_get_next_parent()
617 next = prev ? prev->sibling : node->child; in __of_get_next_child()
627 * of_get_next_child - Iterate a node childs
649 * of_get_next_child_with_prefix - Find the next child node with prefix
652 * @prefix: prefix that the node name should have
655 * skips any nodes whose name doesn't have the given prefix.
671 next = prev ? prev->sibling : node->child; in of_get_next_child_with_prefix()
672 for (; next; next = next->sibling) { in of_get_next_child_with_prefix()
695 next = prev ? prev->sibling : node->child; in of_get_next_status_child()
696 for (; next; next = next->sibling) { in of_get_next_status_child()
708 * of_get_next_available_child - Find the next available child node
723 * of_get_next_reserved_child - Find the next reserved child node
738 * of_get_next_cpu_node - Iterate on cpu nodes
741 * Unusable CPUs (those with the status property set to "fail" or "fail-...")
759 next = prev->sibling; in of_get_next_cpu_node()
761 next = node->child; in of_get_next_cpu_node()
764 for (; next; next = next->sibling) { in of_get_next_cpu_node()
780 * of_get_compatible_child - Find compatible child node
805 * of_get_child_by_name - Find the child node by name for a given parent
807 * @name: child name to look for.
809 * This function looks for child node for given matching name
816 const char *name) in of_get_child_by_name() argument
821 if (of_node_name_eq(child, name)) in of_get_child_by_name()
838 const char *name = kbasename(child->full_name); in __of_find_node_by_path() local
839 if (strncmp(path, name, len) == 0 && (strlen(name) == len)) in __of_find_node_by_path()
864 * of_find_node_opts_by_path - Find a node matching a full OF path
866 * start with '/', the name of a property of the /aliases
901 len = p - path; in of_find_node_opts_by_path()
908 if (strlen(pp->name) == len && !strncmp(pp->name, path, len)) { in of_find_node_opts_by_path()
909 np = of_find_node_by_path(pp->value); in of_find_node_opts_by_path()
929 * of_find_node_by_name - Find a node by its "name" property
934 * @name: The name string to match against
940 const char *name) in of_find_node_by_name() argument
947 if (of_node_name_eq(np, name) && of_node_get(np)) in of_find_node_by_name()
956 * of_find_node_by_type - Find a node by its "device_type" property
984 * of_find_compatible_node - Find a node based on type and one of the
1015 * of_find_node_with_property - Find a node which has a property with
1016 * the given name.
1021 * @prop_name: The name of the property to look for.
1055 for (; matches->name[0] || matches->type[0] || matches->compatible[0]; matches++) { in __of_match_node()
1056 score = __of_device_is_compatible(node, matches->compatible, in __of_match_node()
1057 matches->type, matches->name); in __of_match_node()
1068 * of_match_node - Tell if a device_node has a matching of_match structure
1088 * of_find_matching_node_and_match - Find a node based on an of_device_id
1127 * of_alias_from_compatible - Lookup appropriate alias for a device node
1150 return -ENODEV; in of_alias_from_compatible()
1158 * of_find_node_by_phandle - Find a node given a phandle
1178 handle == phandle_cache[handle_hash]->phandle) in of_find_node_by_phandle()
1183 if (np->phandle == handle && in of_find_node_by_phandle()
1199 printk("%s %pOF", msg, args->np); in of_print_phandle_args()
1200 for (i = 0; i < args->args_count; i++) { in of_print_phandle_args()
1203 pr_cont("%c%08x", delim, args->args[i]); in of_print_phandle_args()
1224 return -EINVAL; in of_phandle_iterator_init()
1228 return -ENOENT; in of_phandle_iterator_init()
1230 it->cells_name = cells_name; in of_phandle_iterator_init()
1231 it->cell_count = cell_count; in of_phandle_iterator_init()
1232 it->parent = np; in of_phandle_iterator_init()
1233 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1234 it->phandle_end = list; in of_phandle_iterator_init()
1235 it->cur = list; in of_phandle_iterator_init()
1245 if (it->node) { in of_phandle_iterator_next()
1246 of_node_put(it->node); in of_phandle_iterator_next()
1247 it->node = NULL; in of_phandle_iterator_next()
1250 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1251 return -ENOENT; in of_phandle_iterator_next()
1253 it->cur = it->phandle_end; in of_phandle_iterator_next()
1256 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1258 if (it->phandle) { in of_phandle_iterator_next()
1261 * Find the provider node and parse the #*-cells property to in of_phandle_iterator_next()
1264 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1266 if (it->cells_name) { in of_phandle_iterator_next()
1267 if (!it->node) { in of_phandle_iterator_next()
1269 it->parent, it->phandle); in of_phandle_iterator_next()
1273 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1280 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1281 count = it->cell_count; in of_phandle_iterator_next()
1284 it->parent, in of_phandle_iterator_next()
1285 it->cells_name, in of_phandle_iterator_next()
1286 it->node); in of_phandle_iterator_next()
1291 count = it->cell_count; in of_phandle_iterator_next()
1298 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1299 if (it->cells_name) in of_phandle_iterator_next()
1301 it->parent, it->cells_name, in of_phandle_iterator_next()
1302 count, it->list_end - it->cur); in of_phandle_iterator_next()
1305 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1306 count, it->list_end - it->cur); in of_phandle_iterator_next()
1311 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1312 it->cur_count = count; in of_phandle_iterator_next()
1317 if (it->node) { in of_phandle_iterator_next()
1318 of_node_put(it->node); in of_phandle_iterator_next()
1319 it->node = NULL; in of_phandle_iterator_next()
1322 return -EINVAL; in of_phandle_iterator_next()
1332 count = it->cur_count; in of_phandle_iterator_args()
1338 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1350 int rc, cur_index = 0; in __of_parse_phandle_with_args() local
1353 return -EINVAL; in __of_parse_phandle_with_args()
1356 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1361 * or return -ENOENT for an empty entry. in __of_parse_phandle_with_args()
1363 rc = -ENOENT; in __of_parse_phandle_with_args()
1372 out_args->args, in __of_parse_phandle_with_args()
1374 out_args->np = it.node; in __of_parse_phandle_with_args()
1375 out_args->args_count = c; in __of_parse_phandle_with_args()
1389 * -ENOENT : index is for empty phandle in __of_parse_phandle_with_args()
1390 * -EINVAL : parsing error on data in __of_parse_phandle_with_args()
1395 return rc; in __of_parse_phandle_with_args()
1400 * of_parse_phandle_with_args_map() - Find a node pointed by phandle in a list and remap it
1402 * @list_name: property name that contains a list
1411 * a <@stem_name>-map property.
1413 * Caller is responsible to call of_node_put() on the returned out_args->np
1419 * #list-cells = <2>;
1423 * #list-cells = <1>;
1427 * #list-cells = <1>;
1428 * list-map = <0 &phandle2 3>,
1431 * list-map-mask = <0x3>;
1446 char *cells_name __free(kfree) = kasprintf(GFP_KERNEL, "#%s-cells", stem_name); in of_parse_phandle_with_args_map()
1447 char *map_name __free(kfree) = kasprintf(GFP_KERNEL, "%s-map", stem_name); in of_parse_phandle_with_args_map()
1448 char *mask_name __free(kfree) = kasprintf(GFP_KERNEL, "%s-map-mask", stem_name); in of_parse_phandle_with_args_map()
1449 char *pass_name __free(kfree) = kasprintf(GFP_KERNEL, "%s-map-pass-thru", stem_name); in of_parse_phandle_with_args_map()
1451 const __be32 *map, *mask, *pass; in of_parse_phandle_with_args_map() local
1452 static const __be32 dummy_mask[] = { [0 ... (MAX_PHANDLE_ARGS - 1)] = cpu_to_be32(~0) }; in of_parse_phandle_with_args_map()
1453 static const __be32 dummy_pass[] = { [0 ... (MAX_PHANDLE_ARGS - 1)] = cpu_to_be32(0) }; in of_parse_phandle_with_args_map()
1460 return -EINVAL; in of_parse_phandle_with_args_map()
1463 return -ENOMEM; in of_parse_phandle_with_args_map()
1465 ret = __of_parse_phandle_with_args(np, list_name, cells_name, -1, index, in of_parse_phandle_with_args_map()
1470 /* Get the #<list>-cells property */ in of_parse_phandle_with_args_map()
1471 cur = out_args->np; in of_parse_phandle_with_args_map()
1476 /* Precalculate the match array - this simplifies match loop */ in of_parse_phandle_with_args_map()
1478 initial_match_array[i] = cpu_to_be32(out_args->args[i]); in of_parse_phandle_with_args_map()
1480 ret = -EINVAL; in of_parse_phandle_with_args_map()
1482 /* Get the <list>-map property */ in of_parse_phandle_with_args_map()
1483 map = of_get_property(cur, map_name, &map_len); in of_parse_phandle_with_args_map()
1484 if (!map) { in of_parse_phandle_with_args_map()
1489 /* Get the <list>-map-mask property (optional) */ in of_parse_phandle_with_args_map()
1493 /* Iterate through <list>-map property */ in of_parse_phandle_with_args_map()
1498 for (i = 0; i < list_size; i++, map_len--) in of_parse_phandle_with_args_map()
1499 match &= !((match_array[i] ^ *map++) & mask[i]); in of_parse_phandle_with_args_map()
1502 new = of_find_node_by_phandle(be32_to_cpup(map)); in of_parse_phandle_with_args_map()
1503 map++; in of_parse_phandle_with_args_map()
1504 map_len--; in of_parse_phandle_with_args_map()
1508 ret = -EINVAL; in of_parse_phandle_with_args_map()
1522 ret = -EINVAL; in of_parse_phandle_with_args_map()
1526 /* Move forward by new node's #<list>-cells amount */ in of_parse_phandle_with_args_map()
1527 map += new_size; in of_parse_phandle_with_args_map()
1528 map_len -= new_size; in of_parse_phandle_with_args_map()
1531 ret = -ENOENT; in of_parse_phandle_with_args_map()
1535 /* Get the <list>-map-pass-thru property (optional) */ in of_parse_phandle_with_args_map()
1541 * Successfully parsed a <list>-map translation; copy new in of_parse_phandle_with_args_map()
1543 * bits specified in <list>-map-pass-thru. in of_parse_phandle_with_args_map()
1546 __be32 val = *(map - new_size + i); in of_parse_phandle_with_args_map()
1550 val |= cpu_to_be32(out_args->args[i]) & pass[i]; in of_parse_phandle_with_args_map()
1554 out_args->args[i] = be32_to_cpu(val); in of_parse_phandle_with_args_map()
1556 out_args->args_count = list_size = new_size; in of_parse_phandle_with_args_map()
1558 out_args->np = new; in of_parse_phandle_with_args_map()
1571 * of_count_phandle_with_args() - Find the number of phandles references in a property
1573 * @list_name: property name that contains a list
1574 * @cells_name: property name that specifies phandles' arguments count
1579 * by a property in the phandle-target node. For example, a gpios
1582 * determined by the #gpio-cells property in the node pointed to by the
1589 int rc, cur_index = 0; in of_count_phandle_with_args() local
1603 return -ENOENT; in of_count_phandle_with_args()
1608 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1609 if (rc) in of_count_phandle_with_args()
1610 return rc; in of_count_phandle_with_args()
1612 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()
1615 if (rc != -ENOENT) in of_count_phandle_with_args()
1616 return rc; in of_count_phandle_with_args()
1626 for (next = list; *next; next = &(*next)->next) { in __of_remove_property_from_list()
1628 *next = prop->next; in __of_remove_property_from_list()
1629 prop->next = NULL; in __of_remove_property_from_list()
1637 * __of_add_property - Add a property to a node without lock operations
1643 int rc = 0; in __of_add_property() local
1649 __of_remove_property_from_list(&np->deadprops, prop); in __of_add_property()
1651 prop->next = NULL; in __of_add_property()
1652 next = &np->properties; in __of_add_property()
1654 if (strcmp(prop->name, (*next)->name) == 0) { in __of_add_property()
1656 rc = -EEXIST; in __of_add_property()
1659 next = &(*next)->next; in __of_add_property()
1665 if (rc) in __of_add_property()
1666 return rc; in __of_add_property()
1673 * of_add_property - Add a property to a node
1679 int rc; in of_add_property() local
1682 rc = __of_add_property(np, prop); in of_add_property()
1685 if (!rc) in of_add_property()
1688 return rc; in of_add_property()
1695 int rc = -ENODEV; in __of_remove_property() local
1699 if (__of_remove_property_from_list(&np->properties, prop)) { in __of_remove_property()
1701 prop->next = np->deadprops; in __of_remove_property()
1702 np->deadprops = prop; in __of_remove_property()
1703 rc = 0; in __of_remove_property()
1707 if (rc) in __of_remove_property()
1708 return rc; in __of_remove_property()
1715 * of_remove_property - Remove a property from a node.
1720 * who-knows-how-many pointers to the data using get-property.
1726 int rc; in of_remove_property() local
1729 return -ENODEV; in of_remove_property()
1732 rc = __of_remove_property(np, prop); in of_remove_property()
1735 if (!rc) in of_remove_property()
1738 return rc; in of_remove_property()
1750 __of_remove_property_from_list(&np->deadprops, newprop); in __of_update_property()
1752 for (next = &np->properties; *next; next = &(*next)->next) { in __of_update_property()
1753 if (of_prop_cmp((*next)->name, newprop->name) == 0) in __of_update_property()
1760 newprop->next = oldprop->next; in __of_update_property()
1762 oldprop->next = np->deadprops; in __of_update_property()
1763 np->deadprops = oldprop; in __of_update_property()
1766 newprop->next = NULL; in __of_update_property()
1778 * of_update_property - Update a property in a node, if the property does
1782 * who-knows-how-many pointers to the data using get-property.
1789 int rc; in of_update_property() local
1791 if (!newprop->name) in of_update_property()
1792 return -EINVAL; in of_update_property()
1795 rc = __of_update_property(np, newprop, &oldprop); in of_update_property()
1798 if (!rc) in of_update_property()
1801 return rc; in of_update_property()
1807 ap->np = np; in of_alias_add()
1808 ap->id = id; in of_alias_add()
1809 strscpy(ap->stem, stem, stem_len + 1); in of_alias_add()
1810 list_add_tail(&ap->link, &aliases_lookup); in of_alias_add()
1812 ap->alias, ap->stem, ap->id, np); in of_alias_add()
1816 * of_alias_scan - Scan all properties of the 'aliases' node
1833 /* linux,stdout-path and /aliases/stdout are for legacy compatibility */ in of_alias_scan()
1834 const char *name = NULL; in of_alias_scan() local
1836 if (of_property_read_string(of_chosen, "stdout-path", &name)) in of_alias_scan()
1837 of_property_read_string(of_chosen, "linux,stdout-path", in of_alias_scan()
1838 &name); in of_alias_scan()
1839 if (IS_ENABLED(CONFIG_PPC) && !name) in of_alias_scan()
1840 of_property_read_string(of_aliases, "stdout", &name); in of_alias_scan()
1841 if (name) in of_alias_scan()
1842 of_stdout = of_find_node_opts_by_path(name, &of_stdout_options); in of_alias_scan()
1844 of_stdout->fwnode.flags |= FWNODE_FLAG_BEST_EFFORT; in of_alias_scan()
1851 const char *start = pp->name; in of_alias_scan()
1858 if (!strcmp(pp->name, "name") || in of_alias_scan()
1859 !strcmp(pp->name, "phandle") || in of_alias_scan()
1860 !strcmp(pp->name, "linux,phandle")) in of_alias_scan()
1863 np = of_find_node_by_path(pp->value); in of_alias_scan()
1869 while (isdigit(*(end-1)) && end > start) in of_alias_scan()
1870 end--; in of_alias_scan()
1871 len = end - start; in of_alias_scan()
1881 ap->alias = start; in of_alias_scan()
1887 * of_alias_get_id - Get alias id for the given device_node
1899 int id = -ENODEV; in of_alias_get_id()
1903 if (strcmp(app->stem, stem) != 0) in of_alias_get_id()
1906 if (np == app->np) { in of_alias_get_id()
1907 id = app->id; in of_alias_get_id()
1918 * of_alias_get_highest_id - Get highest alias id for the given stem
1927 int id = -ENODEV; in of_alias_get_highest_id()
1931 if (strcmp(app->stem, stem) != 0) in of_alias_get_highest_id()
1934 if (app->id > id) in of_alias_get_highest_id()
1935 id = app->id; in of_alias_get_highest_id()
1944 * of_console_check() - Test and setup console for DT setup
1946 * @name: Name to use for preferred console without index. ex. "ttyS"
1949 * Check if the given device node matches the stdout-path property in the
1954 bool of_console_check(const struct device_node *dn, char *name, int index) in of_console_check() argument
1963 return !add_preferred_console(name, index, (char *)of_stdout_options); in of_console_check()
1968 * of_find_next_cache_node - Find a node's subsidiary cache
1979 cache_node = of_parse_phandle(np, "l2-cache", 0); in of_find_next_cache_node()
1981 cache_node = of_parse_phandle(np, "next-level-cache", 0); in of_find_next_cache_node()
1986 /* OF on pmac has nodes instead of properties named "l2-cache" in of_find_next_cache_node()
1998 * of_find_last_cache_level - Find the level at which the last cache is
2017 of_property_read_u32(prev, "cache-level", &cache_level); in of_find_last_cache_level()
2024 * of_map_id - Translate an ID through a downstream mapping.
2026 * @id: device ID to map.
2027 * @map_name: property name of the map to use.
2028 * @map_mask_name: optional property name of the mask to use.
2032 * Given a device ID, look up the appropriate implementation-defined
2034 * ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
2036 * a non-NULL device node pointer, only entries targeting that node will be
2048 const __be32 *map = NULL; in of_map_id() local
2051 return -EINVAL; in of_map_id()
2053 map = of_get_property(np, map_name, &map_len); in of_map_id()
2054 if (!map) { in of_map_id()
2056 return -ENODEV; in of_map_id()
2057 /* Otherwise, no map implies no translation */ in of_map_id()
2062 if (!map_len || map_len % (4 * sizeof(*map))) { in of_map_id()
2065 return -EINVAL; in of_map_id()
2072 * Can be overridden by "{iommu,msi}-map-mask" property. in of_map_id()
2079 for ( ; map_len > 0; map_len -= 4 * sizeof(*map), map += 4) { in of_map_id()
2081 u32 id_base = be32_to_cpup(map + 0); in of_map_id()
2082 u32 phandle = be32_to_cpup(map + 1); in of_map_id()
2083 u32 out_base = be32_to_cpup(map + 2); in of_map_id()
2084 u32 id_len = be32_to_cpup(map + 3); in of_map_id()
2087 pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores id-base (0x%x)\n", in of_map_id()
2090 return -EFAULT; in of_map_id()
2098 return -ENODEV; in of_map_id()
2111 *id_out = masked_id - id_base + out_base; in of_map_id()
2113 …pr_debug("%pOF: %s, using mask %08x, id-base: %08x, out-base: %08x, length: %08x, id: %08x -> %08x… in of_map_id()
2115 id_len, id, masked_id - id_base + out_base); in of_map_id()