/optee_os/core/drivers/crypto/caam/hal/common/ |
A D | hal_cfg_dt.c | 38 for (; node != -FDT_ERR_NOTFOUND; in find_jr_offset() 39 node = fdt_node_offset_by_compatible(fdt, node, in find_jr_offset() 45 *find_node = node; in find_jr_offset() 57 int node = 0; in caam_hal_cfg_get_ctrl_dt() local 64 if (node < 0) in caam_hal_cfg_get_ctrl_dt() 78 size = _fdt_reg_size(fdt, node); in caam_hal_cfg_get_ctrl_dt() 98 int node = 0; in caam_hal_cfg_get_jobring_dt() local 111 jr_it_num = dt_get_irq(fdt, node); in caam_hal_cfg_get_jobring_dt() 126 for (; node != -FDT_ERR_NOTFOUND; in caam_hal_cfg_disable_jobring_dt() 127 node = fdt_node_offset_by_compatible(fdt, node, in caam_hal_cfg_disable_jobring_dt() [all …]
|
/optee_os/core/tee/ |
A D | fs_htree.c | 143 node, sizeof(*node)); in rpc_read_node() 174 node, sizeof(*node)); in rpc_write_node() 249 if (node && node->id == node_id) in find_node() 404 uint8_t *ndata = (uint8_t *)&node->node + sizeof(node->node.hash); in calc_node_hash() 405 size_t nsize = sizeof(node->node) - sizeof(node->node.hash); in calc_node_hash() 423 sizeof(node->child[0]->node.hash)); in calc_node_hash() 430 sizeof(node->child[1]->node.hash)); in calc_node_hash() 721 node->parent->node.flags ^= f; in htree_sync_node_to_storage() 732 res = calc_node_hash(node, meta, targ->arg, node->node.hash); in htree_sync_node_to_storage() 739 return rpc_write_node(targ->ht, node->id, vers, &node->node); in htree_sync_node_to_storage() [all …]
|
/optee_os/core/kernel/ |
A D | lockdep.c | 32 return node; in lockdep_add_to_graph() 34 node = calloc(1, sizeof(*node)); in lockdep_add_to_graph() 35 if (!node) in lockdep_add_to_graph() 42 return node; in lockdep_add_to_graph() 140 qe->node = node; in lockdep_graph_get_shortest_cycle() 343 if (!node) in __lockdep_lock_acquire() 367 lock->node = node; in __lockdep_lock_acquire() 387 if (!node) in __lockdep_lock_tryacquire() 396 lock->node = node; in __lockdep_lock_tryacquire() 435 free(node); in lockdep_node_delete() [all …]
|
A D | tpm.c | 26 static int read_dt_tpm_log_info(void *fdt, int node, paddr_t *buf, in read_dt_tpm_log_info() argument 38 property = fdt_getprop(fdt, node, "tpm_event_log_sm_addr", &len_prop); in read_dt_tpm_log_info() 45 err = fdt_setprop(fdt, node, "tpm_event_log_sm_addr", &zero_addr, in read_dt_tpm_log_info() 55 property = fdt_getprop(fdt, node, "tpm_event_log_size", &len_prop); in read_dt_tpm_log_info() 71 int node = 0; in get_tpm_phys_params() local 81 node = fdt_node_offset_by_compatible(fdt, -1, dt_tpm_match_table); in get_tpm_phys_params() 83 if (node < 0) { in get_tpm_phys_params() 84 EMSG("TPM: Fail to find TPM node %i", node); in get_tpm_phys_params() 88 if (read_dt_tpm_log_info((void *)fdt, node, addr, size) < 0) { in get_tpm_phys_params() 90 node); in get_tpm_phys_params()
|
A D | dt_driver.c | 376 elt->nodeoffset = node; in alloc_elt_and_probe() 398 return alloc_elt_and_probe(fdt, node, drv, dm); in probe_device_by_compat() 523 .nodeoffset = node, in add_node_to_probe() 578 res = add_node_to_probe(fdt, node, dt_drv, dm); in add_probe_node_by_compat() 610 if (_fdt_get_status(fdt, node) == DT_STATUS_DISABLED) in dt_driver_maybe_add_probe_node() 613 count = fdt_stringlist_count(fdt, node, "compatible"); in dt_driver_maybe_add_probe_node() 621 res = add_probe_node_by_compat(fdt, node, compat); in dt_driver_maybe_add_probe_node() 631 static void parse_node(const void *fdt, int node) in parse_node() argument 636 fdt_for_each_subnode(subnode, fdt, node) { in parse_node() 742 static TEE_Result simple_bus_probe(const void *fdt, int node, in simple_bus_probe() argument [all …]
|
A D | dt.c | 45 int dt_disable_status(void *fdt, int node) in dt_disable_status() argument 50 prop = fdt_getprop(fdt, node, "status", &len); in dt_disable_status() 52 if (fdt_setprop_string(fdt, node, "status", "disabled")) in dt_disable_status() 69 if (fdt_setprop_inplace(fdt, node, "status", "disabled", len)) in dt_disable_status() 76 int dt_enable_secure_status(void *fdt, int node) in dt_enable_secure_status() argument 78 if (dt_disable_status(fdt, node)) { in dt_enable_secure_status() 83 if (fdt_setprop_string(fdt, node, "secure-status", "okay")) in dt_enable_secure_status()
|
/optee_os/core/drivers/clk/ |
A D | clk_dt.c | 49 static TEE_Result clk_probe_clock_provider_node(const void *fdt, int node); 51 static TEE_Result parse_clock_property(const void *fdt, int node) in parse_clock_property() argument 61 prop = fdt_getprop(fdt, node, "clocks", &len); in parse_clock_property() 78 fdt_get_name(fdt, node, NULL), res); in parse_clock_property() 93 static TEE_Result clk_probe_clock_provider_node(const void *fdt, int node) in clk_probe_clock_provider_node() argument 99 status = _fdt_get_status(fdt, node); in clk_probe_clock_provider_node() 104 if (!fdt_getprop(fdt, node, "#clock-cells", &len)) in clk_probe_clock_provider_node() 108 if (dt_driver_get_provider_by_node(node, DT_DRIVER_CLK)) in clk_probe_clock_provider_node() 112 res = parse_clock_property(fdt, node); in clk_probe_clock_provider_node() 116 return dt_driver_probe_device_by_node(fdt, node, DT_DRIVER_CLK); in clk_probe_clock_provider_node()
|
/optee_os/core/drivers/ |
A D | stm32_gpio.c | 201 static int get_pinctrl_from_fdt(void *fdt, int node, in get_pinctrl_from_fdt() argument 212 cuint = fdt_getprop(fdt, node, "pinmux", &len); in get_pinctrl_from_fdt() 224 if (fdt_getprop(fdt, node, "bias-pull-up", NULL)) in get_pinctrl_from_fdt() 226 if (fdt_getprop(fdt, node, "bias-pull-down", NULL)) in get_pinctrl_from_fdt() 318 int node = 0; in stm32_pinctrl_fdt_get_pinctrl() local 322 if (node < 0) in stm32_pinctrl_fdt_get_pinctrl() 325 fdt_for_each_subnode(subnode, fdt, node) { in stm32_pinctrl_fdt_get_pinctrl() 350 int node = 0; in stm32_get_gpio_count() local 353 fdt_for_each_subnode(node, fdt, pinctrl_node) { in stm32_get_gpio_count() 357 cuint = fdt_getprop(fdt, node, "reg", NULL); in stm32_get_gpio_count() [all …]
|
A D | stm32_rng.c | 194 int node = -1; in stm32_rng_init() local 206 node = fdt_node_offset_by_compatible(fdt, node, DT_RNG_COMPAT); in stm32_rng_init() 207 if (node < 0) in stm32_rng_init() 210 _fdt_fill_device_info(fdt, &dt_info, node); in stm32_rng_init() 238 res = clk_dt_get_by_index(fdt, node, 0, &stm32_rng->clock); in stm32_rng_init()
|
A D | atmel_trng.c | 118 static TEE_Result trng_node_probe(const void *fdt, int node, in trng_node_probe() argument 121 int status = _fdt_get_status(fdt, node); in trng_node_probe() 131 res = clk_dt_get_by_index(fdt, node, 0, &clk); in trng_node_probe() 135 if (dt_map_dev(fdt, node, &trng_base, &size) < 0) in trng_node_probe()
|
A D | ls_dspi.c | 535 int node = 0; in get_info_from_device_tree() local 549 node = 0; in get_info_from_device_tree() 550 while (node != -FDT_ERR_NOTFOUND) { in get_info_from_device_tree() 551 node = fdt_node_offset_by_compatible(fdt, node, in get_info_from_device_tree() 553 if (!(_fdt_get_status(fdt, node) & DT_STATUS_OK_SEC)) in get_info_from_device_tree() 556 bus_num = fdt_getprop(fdt, node, "bus-num", NULL); in get_info_from_device_tree() 559 if (dt_map_dev(fdt, node, &ctrl_base, &size) < 0) { in get_info_from_device_tree() 570 chip_select_num = fdt_getprop(fdt, node, "spi-num-chipselects", NULL); in get_info_from_device_tree()
|
A D | stm32_uart.c | 132 struct stm32_uart_pdata *stm32_uart_init_from_dt_node(void *fdt, int node) in stm32_uart_init_from_dt_node() argument 140 _fdt_fill_device_info(fdt, &info, node); in stm32_uart_init_from_dt_node() 156 res = clk_dt_get_by_index(fdt, node, 0, &pd->clock); in stm32_uart_init_from_dt_node() 171 count = stm32_pinctrl_fdt_get_pinctrl(fdt, node, NULL, 0); in stm32_uart_init_from_dt_node() 180 stm32_pinctrl_fdt_get_pinctrl(fdt, node, pinctrl_cfg, count); in stm32_uart_init_from_dt_node()
|
A D | ls_gpio.c | 180 int node = 0; in get_info_from_device_tree() local 194 node = fdt_path_offset(fdt, gpio_controller_map in get_info_from_device_tree() 196 if (node > 0) { in get_info_from_device_tree() 197 if (dt_map_dev(fdt, node, &ctrl_base, &size) < 0) { in get_info_from_device_tree()
|
A D | zynqmp_csu_aes.c | 390 int node = -1; in zynqmp_csu_aes_dt_enable_secure_status() local 397 node = fdt_node_offset_by_compatible(fdt, 0, in zynqmp_csu_aes_dt_enable_secure_status() 399 if (node >= 0) in zynqmp_csu_aes_dt_enable_secure_status() 403 if (node < 0) in zynqmp_csu_aes_dt_enable_secure_status() 406 if (_fdt_get_status(fdt, node) == DT_STATUS_DISABLED) in zynqmp_csu_aes_dt_enable_secure_status() 409 if (dt_enable_secure_status(fdt, node)) { in zynqmp_csu_aes_dt_enable_secure_status()
|
A D | atmel_rstc.c | 40 static TEE_Result atmel_rstc_probe(const void *fdt, int node, in atmel_rstc_probe() argument 46 if (dt_map_dev(fdt, node, &rstc_base, &size) < 0) in atmel_rstc_probe()
|
A D | stm32_etzpc.c | 322 int node = fdt_node_offset_by_compatible(fdt, -1, ETZPC_COMPAT); in init_etzpc_from_dt() local 328 if (node < 0) in init_etzpc_from_dt() 330 assert(fdt_node_offset_by_compatible(fdt, node, ETZPC_COMPAT) < 0); in init_etzpc_from_dt() 332 status = _fdt_get_status(fdt, node); in init_etzpc_from_dt() 336 pbase = _fdt_reg_base_address(fdt, node); in init_etzpc_from_dt()
|
A D | atmel_shdwc.c | 139 static TEE_Result atmel_shdwc_probe(const void *fdt, int node, in atmel_shdwc_probe() argument 152 if (dt_map_dev(fdt, node, &shdwc_base, &size) < 0) in atmel_shdwc_probe() 167 at91_shdwc_dt_configure(fdt, node); in atmel_shdwc_probe()
|
A D | ls_i2c.c | 125 int node = 0; in i2c_init() local 139 node = fdt_path_offset(fdt, in i2c_init() 141 if (node > 0) { in i2c_init() 142 if (dt_map_dev(fdt, node, &ctrl_base, &size) < 0) { in i2c_init()
|
/optee_os/core/arch/arm/plat-stm32mp1/drivers/ |
A D | stm32mp1_pmic.c | 47 static int node = -FDT_ERR_BADOFFSET; in dt_get_pmic_node() local 49 if (node == -FDT_ERR_BADOFFSET) in dt_get_pmic_node() 52 return node; in dt_get_pmic_node() 60 int node = dt_get_pmic_node(fdt); in dt_pmic_status() local 62 if (node > 0) in dt_pmic_status() 63 return _fdt_get_status(fdt, node); in dt_pmic_status() 341 int node = 0; in save_cpu_supply_name() local 349 node = fdt_path_offset(fdt, "/cpus/cpu@0"); in save_cpu_supply_name() 350 if (node < 0) in save_cpu_supply_name() 358 if (node < 0) in save_cpu_supply_name() [all …]
|
/optee_os/core/include/kernel/ |
A D | dt.h | 102 TEE_Result (*probe)(const void *fdt, int node, const void *compat_data); 151 int dt_disable_status(void *fdt, int node); 161 int dt_enable_secure_status(void *fdt, int node); 195 int node); 232 int node __unused) in _fdt_fill_device_info()
|
A D | interrupt.h | 78 int dt_get_irq_type_prio(const void *fdt, int node, uint32_t *type, 84 static inline int dt_get_irq(const void *fdt, int node) in dt_get_irq() argument 86 return dt_get_irq_type_prio(fdt, node, NULL, NULL); in dt_get_irq()
|
/optee_os/core/lib/libfdt/ |
A D | fdt_overlay.c | 116 static int overlay_phandle_add_offset(void *fdt, int node, in overlay_phandle_add_offset() argument 123 val = fdt_getprop(fdt, node, name, &len); in overlay_phandle_add_offset() 138 return fdt_setprop_inplace_u32(fdt, node, name, adj_val); in overlay_phandle_add_offset() 156 static int overlay_adjust_node_phandles(void *fdto, int node, in overlay_adjust_node_phandles() argument 162 ret = overlay_phandle_add_offset(fdto, node, "phandle", delta); in overlay_adjust_node_phandles() 166 ret = overlay_phandle_add_offset(fdto, node, "linux,phandle", delta); in overlay_adjust_node_phandles() 170 fdt_for_each_subnode(child, fdto, node) { in overlay_adjust_node_phandles() 557 void *fdto, int node) in overlay_apply_node() argument 562 fdt_for_each_property_offset(property, fdto, node) { in overlay_apply_node() 580 fdt_for_each_subnode(subnode, fdto, node) { in overlay_apply_node()
|
/optee_os/core/arch/arm/plat-stm32mp1/ |
A D | main.c | 112 int node = 0; in init_console_from_dt() local 116 res = get_console_node_from_dt(fdt, &node, NULL, NULL); in init_console_from_dt() 119 res = get_console_node_from_dt(fdt, &node, NULL, NULL); in init_console_from_dt() 126 pd = stm32_uart_init_from_dt_node(fdt, node); in init_console_from_dt()
|
/optee_os/core/lib/libfdt/include/ |
A D | libfdt.h | 226 #define fdt_for_each_subnode(node, fdt, parent) \ argument 227 for (node = fdt_first_subnode(fdt, parent); \ 228 node >= 0; \ 229 node = fdt_next_subnode(fdt, node)) 605 #define fdt_for_each_property_offset(property, fdt, node) \ argument 606 for (property = fdt_first_property_offset(fdt, node); \
|
/optee_os/core/drivers/imx/dcp/ |
A D | dcp.c | 668 int node = -1; in dcp_pbase() local 678 node = fdt_node_offset_by_compatible(fdt, 0, in dcp_pbase() 680 if (node >= 0) in dcp_pbase() 684 if (node < 0) { in dcp_pbase() 685 EMSG("DCP node not found err = %d", node); in dcp_pbase() 689 if (_fdt_get_status(fdt, node) == DT_STATUS_DISABLED) in dcp_pbase() 693 if (dt_enable_secure_status(fdt, node)) { in dcp_pbase() 698 *base = _fdt_reg_base_address(fdt, node); in dcp_pbase()
|