| /optee_os/core/lib/libfdt/include/ |
| H A D | libfdt.h | 540 const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp); 560 int fdt_first_property_offset(const void *fdt, int nodeoffset); 654 int nodeoffset, 687 const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset, 689 static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset, in fdt_get_property_w() argument 694 fdt_get_property(fdt, nodeoffset, name, lenp); in fdt_get_property_w() 745 const void *fdt_getprop_namelen(const void *fdt, int nodeoffset, 747 static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset, in fdt_getprop_namelen_w() argument 751 return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name, in fdt_getprop_namelen_w() 784 const void *fdt_getprop(const void *fdt, int nodeoffset, [all …]
|
| /optee_os/core/lib/libfdt/ |
| H A D | fdt_wip.c | 13 int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, in fdt_setprop_inplace_namelen_partial() argument 21 propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen, in fdt_setprop_inplace_namelen_partial() 33 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, in fdt_setprop_inplace() argument 39 propval = fdt_getprop(fdt, nodeoffset, name, &proplen); in fdt_setprop_inplace() 46 return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name, in fdt_setprop_inplace() 59 int fdt_nop_property(void *fdt, int nodeoffset, const char *name) in fdt_nop_property() argument 64 prop = fdt_get_property_w(fdt, nodeoffset, name, &len); in fdt_nop_property() 83 int fdt_nop_node(void *fdt, int nodeoffset) in fdt_nop_node() argument 87 endoffset = fdt_node_end_offset_(fdt, nodeoffset); in fdt_nop_node() 91 fdt_nop_region_(fdt_offset_ptr_w(fdt, nodeoffset, 0), in fdt_nop_node() [all …]
|
| H A D | fdt_addresses.c | 14 static int fdt_cells(const void *fdt, int nodeoffset, const char *name) in fdt_cells() argument 20 c = fdt_getprop(fdt, nodeoffset, name, &len); in fdt_cells() 34 int fdt_address_cells(const void *fdt, int nodeoffset) in fdt_address_cells() argument 38 val = fdt_cells(fdt, nodeoffset, "#address-cells"); in fdt_address_cells() 46 int fdt_size_cells(const void *fdt, int nodeoffset) in fdt_size_cells() argument 50 val = fdt_cells(fdt, nodeoffset, "#size-cells"); in fdt_size_cells() 57 int fdt_appendprop_addrrange(void *fdt, int parent, int nodeoffset, in fdt_appendprop_addrrange() argument 99 return fdt_appendprop(fdt, nodeoffset, name, data, in fdt_appendprop_addrrange()
|
| H A D | fdt_ro.c | 287 const char *fdt_get_name(const void *fdt, int nodeoffset, int *len) in fdt_get_name() argument 289 const struct fdt_node_header *nh = fdt_offset_ptr_(fdt, nodeoffset); in fdt_get_name() 294 || ((err = fdt_check_node_offset_(fdt, nodeoffset)) < 0)) in fdt_get_name() 325 int fdt_first_property_offset(const void *fdt, int nodeoffset) in fdt_first_property_offset() argument 329 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0) in fdt_first_property_offset() 429 int nodeoffset, in fdt_get_property() argument 432 return fdt_get_property_namelen(fdt, nodeoffset, name, in fdt_get_property() 436 const void *fdt_getprop_namelen(const void *fdt, int nodeoffset, in fdt_getprop_namelen() argument 442 prop = fdt_get_property_namelen_(fdt, nodeoffset, name, namelen, lenp, in fdt_getprop_namelen() 482 const void *fdt_getprop(const void *fdt, int nodeoffset, in fdt_getprop() argument [all …]
|
| H A D | fdt_rw.c | 170 static int fdt_resize_property_(void *fdt, int nodeoffset, const char *name, in fdt_resize_property_() argument 176 *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen); in fdt_resize_property_() 188 static int fdt_add_property_(void *fdt, int nodeoffset, const char *name, in fdt_add_property_() argument 197 if ((nextoffset = fdt_check_node_offset_(fdt, nodeoffset)) < 0) in fdt_add_property_() 220 int fdt_set_name(void *fdt, int nodeoffset, const char *name) in fdt_set_name() argument 228 namep = (char *)(uintptr_t)fdt_get_name(fdt, nodeoffset, &oldlen); in fdt_set_name() 243 int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name, in fdt_setprop_placeholder() argument 251 err = fdt_resize_property_(fdt, nodeoffset, name, len, &prop); in fdt_setprop_placeholder() 253 err = fdt_add_property_(fdt, nodeoffset, name, len, &prop); in fdt_setprop_placeholder() 261 int fdt_setprop(void *fdt, int nodeoffset, const char *name, in fdt_setprop() argument [all …]
|
| H A D | fdt_overlay.c | 650 static int get_path_len(const void *fdt, int nodeoffset) in get_path_len() argument 658 name = fdt_get_name(fdt, nodeoffset, &namelen); in get_path_len() 666 nodeoffset = fdt_parent_offset(fdt, nodeoffset); in get_path_len() 667 if (nodeoffset < 0) in get_path_len() 668 return nodeoffset; in get_path_len()
|
| H A D | libfdt_internal.h | 24 int fdt_node_end_offset_(void *fdt, int nodeoffset);
|
| /optee_os/core/include/drivers/ |
| H A D | pinctrl.h | 74 int nodeoffset, in pinctrl_register_provider() argument 78 return dt_driver_register_provider(fdt, nodeoffset, in pinctrl_register_provider() 93 TEE_Result pinctrl_get_state_by_name(const void *fdt, int nodeoffset, 107 TEE_Result pinctrl_get_state_by_idx(const void *fdt, int nodeoffset, 133 TEE_Result pinctrl_parse_dt_pin_modes(const void *fdt, int nodeoffset, 137 pinctrl_register_provider(const void *fdt __unused, int nodeoffset __unused, in pinctrl_register_provider() 144 pinctrl_get_state_by_name(const void *fdt __unused, int nodeoffset __unused, in pinctrl_get_state_by_name() 152 pinctrl_get_state_by_idx(const void *fdt __unused, int nodeoffset __unused, in pinctrl_get_state_by_idx() 169 int nodeoffset __unused, in pinctrl_parse_dt_pin_modes()
|
| H A D | nvmem.h | 72 int nodeoffset, in nvmem_register_provider() argument 76 return dt_driver_register_provider(fdt, nodeoffset, in nvmem_register_provider() 92 TEE_Result nvmem_get_cell_by_name(const void *fdt, int nodeoffset, 106 int nodeoffset, 117 TEE_Result nvmem_cell_parse_dt(const void *fdt, int nodeoffset, 158 int nodeoffset __unused, in nvmem_register_provider() 166 int nodeoffset __unused, in nvmem_get_cell_by_name() 175 int nodeoffset __unused, in nvmem_get_cell_by_index() 183 int nodeoffset __unused, in nvmem_cell_parse_dt()
|
| H A D | rstctrl.h | 159 int nodeoffset, in rstctrl_dt_get_by_index() argument 166 res = dt_driver_device_from_node_idx_prop("resets", fdt, nodeoffset, in rstctrl_dt_get_by_index() 176 int nodeoffset __unused, in rstctrl_dt_get_by_index() 198 TEE_Result rstctrl_dt_get_by_name(const void *fdt, int nodeoffset, 222 int nodeoffset, in rstctrl_register_provider() argument 226 return dt_driver_register_provider(fdt, nodeoffset, in rstctrl_register_provider()
|
| H A D | clk_dt.h | 46 TEE_Result clk_dt_get_by_index(const void *fdt, int nodeoffset, 62 TEE_Result clk_dt_get_by_name(const void *fdt, int nodeoffset, 85 int nodeoffset, in clk_dt_register_clk_provider() argument 89 return dt_driver_register_provider(fdt, nodeoffset, in clk_dt_register_clk_provider()
|
| H A D | gpio.h | 203 TEE_Result gpio_dt_get_by_index(const void *fdt, int nodeoffset, 225 TEE_Result gpio_dt_cfg_by_index(const void *fdt, int nodeoffset, 230 int nodeoffset __unused, in gpio_dt_get_by_index() 239 int nodeoffset __unused, in gpio_dt_cfg_by_index() 282 static inline TEE_Result gpio_register_provider(const void *fdt, int nodeoffset, in gpio_register_provider() argument 286 return dt_driver_register_provider(fdt, nodeoffset, in gpio_register_provider()
|
| H A D | i2c.h | 185 static inline TEE_Result i2c_dt_get_dev(const void *fdt, int nodeoffset, in i2c_dt_get_dev() argument 191 res = dt_driver_device_from_parent(fdt, nodeoffset, DT_DRIVER_I2C, in i2c_dt_get_dev() 223 int nodeoffset __unused, in i2c_dt_get_dev() 251 static inline TEE_Result i2c_register_provider(const void *fdt, int nodeoffset, in i2c_register_provider() argument 258 res = dt_driver_register_provider(fdt, nodeoffset, in i2c_register_provider() 264 fdt_for_each_subnode(subnode, fdt, nodeoffset) in i2c_register_provider()
|
| /optee_os/core/drivers/nvmem/ |
| H A D | nvmem.c | 10 TEE_Result nvmem_cell_parse_dt(const void *fdt, int nodeoffset, in nvmem_cell_parse_dt() argument 13 if (fdt_reg_info(fdt, nodeoffset, &cell->offset, &cell->len)) in nvmem_cell_parse_dt() 19 TEE_Result nvmem_get_cell_by_name(const void *fdt, int nodeoffset, in nvmem_get_cell_by_name() argument 24 index = fdt_stringlist_search(fdt, nodeoffset, "nvmem-cell-names", in nvmem_get_cell_by_name() 29 return nvmem_get_cell_by_index(fdt, nodeoffset, index, cell); in nvmem_get_cell_by_name() 33 int nodeoffset, in nvmem_get_cell_by_index() argument 41 nodeoffset, index, in nvmem_get_cell_by_index()
|
| /optee_os/core/include/kernel/ |
| H A D | dt_driver.h | 57 typedef TEE_Result (*dt_driver_probe_func)(const void *fdt, int nodeoffset, 135 TEE_Result dt_driver_register_provider(const void *fdt, int nodeoffset, 159 const void *fdt, int nodeoffset, 180 TEE_Result dt_driver_device_from_parent(const void *fdt, int nodeoffset, 220 dt_driver_get_provider_by_node(int nodeoffset, enum dt_driver_type type); 251 TEE_Result dt_driver_probe_device_by_node(const void *fdt, int nodeoffset, 263 int fdt_get_dt_driver_cells(const void *fdt, int nodeoffset, 272 TEE_Result dt_driver_maybe_add_probe_node(const void *fdt, int nodeoffset);
|
| H A D | dt.h | 101 int dt_getprop_as_number(const void *fdt, int nodeoffset, const char *name, 440 int nodeoffset __unused, in dt_getprop_as_number()
|
| /optee_os/core/kernel/ |
| H A D | dt_driver.c | 32 int nodeoffset; member 54 int nodeoffset; member 126 TEE_Result dt_driver_register_provider(const void *fdt, int nodeoffset, in dt_driver_register_provider() argument 136 provider_cells = fdt_get_dt_driver_cells(fdt, nodeoffset, type); in dt_driver_register_provider() 139 provider_cells, fdt_get_name(fdt, nodeoffset, NULL)); in dt_driver_register_provider() 143 phandle = fdt_get_phandle(fdt, nodeoffset); in dt_driver_register_provider() 146 fdt_get_name(fdt, nodeoffset, NULL)); in dt_driver_register_provider() 154 prv->nodeoffset = nodeoffset; in dt_driver_register_provider() 181 int fdt_get_dt_driver_cells(const void *fdt, int nodeoffset, in fdt_get_dt_driver_cells() argument 214 c = fdt_getprop(fdt, nodeoffset, cells_name, &len); in fdt_get_dt_driver_cells() [all …]
|
| H A D | dt.c | 411 int dt_getprop_as_number(const void *fdt, int nodeoffset, const char *name, in dt_getprop_as_number() argument 417 prop = fdt_getprop(fdt, nodeoffset, name, &len); in dt_getprop_as_number()
|
| /optee_os/core/drivers/clk/ |
| H A D | clk_dt.c | 16 TEE_Result clk_dt_get_by_name(const void *fdt, int nodeoffset, in clk_dt_get_by_name() argument 21 clk_id = fdt_stringlist_search(fdt, nodeoffset, "clock-names", name); in clk_dt_get_by_name() 27 return clk_dt_get_by_index(fdt, nodeoffset, clk_id, clk); in clk_dt_get_by_name() 31 int nodeoffset, unsigned int clk_idx, in clk_dt_get_by_idx_prop() argument 37 res = dt_driver_device_from_node_idx_prop(prop_name, fdt, nodeoffset, in clk_dt_get_by_idx_prop() 46 TEE_Result clk_dt_get_by_index(const void *fdt, int nodeoffset, in clk_dt_get_by_index() argument 49 return clk_dt_get_by_idx_prop("clocks", fdt, nodeoffset, clk_idx, clk); in clk_dt_get_by_index() 142 static void parse_assigned_clock(const void *fdt, int nodeoffset) in parse_assigned_clock() argument 152 rate_prop = fdt_getprop(fdt, nodeoffset, "assigned-clock-rates", in parse_assigned_clock() 157 res = clk_dt_get_by_idx_prop("assigned-clocks", fdt, nodeoffset, in parse_assigned_clock() [all …]
|
| /optee_os/core/drivers/pinctrl/ |
| H A D | pinctrl.c | 69 TEE_Result pinctrl_get_state_by_idx(const void *fdt, int nodeoffset, in pinctrl_get_state_by_idx() argument 87 prop = fdt_getprop(fdt, nodeoffset, prop_name, (int *)&conf_count); in pinctrl_get_state_by_idx() 102 nodeoffset, conf_id, in pinctrl_get_state_by_idx() 118 TEE_Result pinctrl_get_state_by_name(const void *fdt, int nodeoffset, in pinctrl_get_state_by_name() argument 127 pinctrl_index = fdt_stringlist_search(fdt, nodeoffset, "pinctrl-names", in pinctrl_get_state_by_name() 137 return pinctrl_get_state_by_idx(fdt, nodeoffset, pinctrl_index, state); in pinctrl_get_state_by_name()
|
| /optee_os/core/drivers/rstctrl/ |
| H A D | rstctrl.c | 40 TEE_Result rstctrl_dt_get_by_name(const void *fdt, int nodeoffset, in rstctrl_dt_get_by_name() argument 45 index = fdt_stringlist_search(fdt, nodeoffset, "reset-names", name); in rstctrl_dt_get_by_name() 49 return rstctrl_dt_get_by_index(fdt, nodeoffset, index, rstctrl); in rstctrl_dt_get_by_name()
|
| /optee_os/core/drivers/gpio/ |
| H A D | gpio.c | 35 TEE_Result gpio_dt_get_by_index(const void *fdt, int nodeoffset, in gpio_dt_get_by_index() argument 54 nodeoffset, in gpio_dt_get_by_index() 97 TEE_Result gpio_dt_cfg_by_index(const void *fdt, int nodeoffset, in gpio_dt_cfg_by_index() argument 103 res = gpio_dt_get_by_index(fdt, nodeoffset, index, gpio_name, gpio); in gpio_dt_cfg_by_index()
|
| /optee_os/core/drivers/clk/sam/ |
| H A D | sama5d2_clk.c | 318 static TEE_Result pmc_setup(const void *fdt, int nodeoffset, in pmc_setup() argument 353 if (dt_map_dev(fdt, nodeoffset, &base, &size, DT_MAP_AUTO) < 0) in pmc_setup() 356 if (fdt_get_status(fdt, nodeoffset) == DT_STATUS_OK_SEC) in pmc_setup() 359 res = clk_dt_get_by_name(fdt, nodeoffset, "slow_clk", &slow_clk); in pmc_setup() 363 res = clk_dt_get_by_name(fdt, nodeoffset, "main_xtal", &main_xtal_clk); in pmc_setup() 381 fdt_prop = fdt_getprop(fdt, nodeoffset, "atmel,osc-bypass", NULL); in pmc_setup() 605 clk_dt_register_clk_provider(fdt, nodeoffset, clk_dt_pmc_get, pmc); in pmc_setup()
|
| H A D | sama7g5_clk.c | 1258 static TEE_Result pmc_setup_sama7g5(const void *fdt, int nodeoffset, in pmc_setup_sama7g5() argument 1282 if (dt_map_dev(fdt, nodeoffset, &base, &size, DT_MAP_AUTO) < 0) in pmc_setup_sama7g5() 1285 if (fdt_get_status(fdt, nodeoffset) == DT_STATUS_OK_SEC) in pmc_setup_sama7g5() 1288 res = clk_dt_get_by_name(fdt, nodeoffset, "md_slck", &md_slck); in pmc_setup_sama7g5() 1292 res = clk_dt_get_by_name(fdt, nodeoffset, "td_slck", &td_slck); in pmc_setup_sama7g5() 1296 res = clk_dt_get_by_name(fdt, nodeoffset, "main_xtal", &main_xtal_clk); in pmc_setup_sama7g5() 1314 fdt_prop = fdt_getprop(fdt, nodeoffset, "atmel,osc-bypass", NULL); in pmc_setup_sama7g5() 1601 res = clk_dt_register_clk_provider(fdt, nodeoffset, clk_dt_pmc_get, in pmc_setup_sama7g5()
|