Lines Matching refs:dtb
22 int fdt_read_uint32_array(const void *dtb, int node, const char *prop_name, in fdt_read_uint32_array() argument
28 assert(dtb != NULL); in fdt_read_uint32_array()
34 prop = fdt_getprop(dtb, node, prop_name, &value_len); in fdt_read_uint32_array()
53 int fdt_read_uint32(const void *dtb, int node, const char *prop_name, in fdt_read_uint32() argument
56 return fdt_read_uint32_array(dtb, node, prop_name, 1, value); in fdt_read_uint32()
59 uint32_t fdt_read_uint32_default(const void *dtb, int node, in fdt_read_uint32_default() argument
63 int err = fdt_read_uint32(dtb, node, prop_name, &ret); in fdt_read_uint32_default()
72 int fdt_read_uint64(const void *dtb, int node, const char *prop_name, in fdt_read_uint64() argument
78 ret = fdt_read_uint32_array(dtb, node, prop_name, 2, array); in fdt_read_uint64()
92 int fdtw_read_bytes(const void *dtb, int node, const char *prop, in fdtw_read_bytes() argument
98 assert(dtb != NULL); in fdtw_read_bytes()
104 ptr = fdt_getprop_namelen(dtb, node, prop, (int)strlen(prop), in fdtw_read_bytes()
127 int fdtw_read_string(const void *dtb, int node, const char *prop, in fdtw_read_string() argument
133 assert(dtb != NULL); in fdtw_read_string()
139 ptr = fdt_getprop_namelen(dtb, node, prop, (int)strlen(prop), NULL); in fdtw_read_string()
158 int fdtw_write_inplace_cells(void *dtb, int node, const char *prop, in fdtw_write_inplace_cells() argument
163 assert(dtb != NULL); in fdtw_write_inplace_cells()
179 err = fdt_setprop_inplace(dtb, node, prop, value, len); in fdtw_write_inplace_cells()
193 int fdtw_write_inplace_bytes(void *dtb, int node, const char *prop, in fdtw_write_inplace_bytes() argument
199 assert(dtb != NULL); in fdtw_write_inplace_bytes()
207 ptr = fdt_getprop_namelen(dtb, node, prop, namelen, &value_len); in fdtw_write_inplace_bytes()
220 err = fdt_setprop_inplace_namelen_partial(dtb, node, prop, in fdtw_write_inplace_bytes()
241 int fdt_get_reg_props_by_index(const void *dtb, int node, int index, in fdt_get_reg_props_by_index() argument
249 parent = fdt_parent_offset(dtb, node); in fdt_get_reg_props_by_index()
254 ac = fdt_address_cells(dtb, parent); in fdt_get_reg_props_by_index()
255 sc = fdt_size_cells(dtb, parent); in fdt_get_reg_props_by_index()
259 prop = fdt_getprop(dtb, node, "reg", &len); in fdt_get_reg_props_by_index()
285 int fdt_get_reg_props_by_name(const void *dtb, int node, const char *name, in fdt_get_reg_props_by_name() argument
290 index = fdt_stringlist_search(dtb, node, "reg-names", name); in fdt_get_reg_props_by_name()
295 return fdt_get_reg_props_by_index(dtb, node, index, base, size); in fdt_get_reg_props_by_name()
303 int fdt_get_stdout_node_offset(const void *dtb) in fdt_get_stdout_node_offset() argument
310 node = fdt_path_offset(dtb, "/secure-chosen"); in fdt_get_stdout_node_offset()
312 node = fdt_path_offset(dtb, "/chosen"); in fdt_get_stdout_node_offset()
318 prop = fdt_getprop(dtb, node, "stdout-path", NULL); in fdt_get_stdout_node_offset()
333 return fdt_path_offset_namelen(dtb, prop, len); in fdt_get_stdout_node_offset()
337 path = fdt_get_alias_namelen(dtb, prop, len); in fdt_get_stdout_node_offset()
342 return fdt_path_offset(dtb, path); in fdt_get_stdout_node_offset()
388 static uint64_t fdtw_search_all_xlat_entries(const void *dtb, in fdtw_search_all_xlat_entries() argument
406 parent_bus_node = fdt_parent_offset(dtb, local_bus); in fdtw_search_all_xlat_entries()
407 self_addr_cells = fdt_address_cells(dtb, local_bus); in fdtw_search_all_xlat_entries()
408 self_size_cells = fdt_size_cells(dtb, local_bus); in fdtw_search_all_xlat_entries()
409 parent_addr_cells = fdt_address_cells(dtb, parent_bus_node); in fdtw_search_all_xlat_entries()
439 base_address, fdt_get_name(dtb, local_bus, NULL)); in fdtw_search_all_xlat_entries()
491 uint64_t fdtw_translate_address(const void *dtb, int node, in fdtw_translate_address() argument
498 local_bus_node = fdt_parent_offset(dtb, node); in fdtw_translate_address()
499 node_name = fdt_get_name(dtb, local_bus_node, NULL); in fdtw_translate_address()
509 const struct fdt_property *property = fdt_get_property(dtb, in fdtw_translate_address()
525 return fdtw_translate_address(dtb, local_bus_node, base_address); in fdtw_translate_address()
530 global_address = fdtw_search_all_xlat_entries(dtb, property, in fdtw_translate_address()
538 return fdtw_translate_address(dtb, local_bus_node, global_address); in fdtw_translate_address()