Home
last modified time | relevance | path

Searched refs:fdt (Results 1 – 25 of 92) sorted by relevance

1234

/optee_os-3.20.0/core/lib/libfdt/
A Dfdt_sw.c67 if (fdt_off_dt_strings(fdt) != fdt_totalsize(fdt)) in fdt_sw_probe_struct_()
95 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt) in fdt_grab_space_()
109 void *fdt = buf; in fdt_create_with_flags() local
133 fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt)); in fdt_create_with_flags()
151 headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in fdt_resize()
160 oldtail = (char *)fdt + fdt_totalsize(fdt) - tailsize; in fdt_resize()
207 fdt_set_off_dt_strings(fdt, fdt_totalsize(fdt)); in fdt_finish_reservemap()
244 char *strtab = (char *)fdt + fdt_totalsize(fdt); in fdt_add_string_()
250 struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in fdt_add_string_()
270 char *strtab = (char *)fdt + fdt_totalsize(fdt); in fdt_find_add_string_()
[all …]
A Dfdt_rw.c22 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt))); in fdt_blocks_misordered_()
49 return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in fdt_data_size_()
55 char *end = (char *)fdt + fdt_data_size_(fdt); in fdt_splice_()
75 fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta); in fdt_splice_mem_rsv_()
76 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta); in fdt_splice_mem_rsv_()
89 fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta); in fdt_splice_struct_()
105 + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in fdt_splice_string_()
117 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt); in fdt_find_add_string_()
148 re = fdt_mem_rsv_w_(fdt, fdt_num_mem_rsv(fdt)); in fdt_add_mem_rsv()
472 fdt_packblocks_(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt)); in fdt_pack()
[all …]
A Dfdt.c22 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_ro_probe_()
83 if (fdt_version(fdt) < fdt_last_comp_version(fdt)) in fdt_check_header()
91 if (!check_off_(hdrsize, fdt_totalsize(fdt), fdt_off_mem_rsvmap(fdt))) in fdt_check_header()
95 if (fdt_version(fdt) < 17) { in fdt_check_header()
97 fdt_off_dt_struct(fdt))) in fdt_check_header()
101 fdt_off_dt_struct(fdt), in fdt_check_header()
102 fdt_size_dt_struct(fdt))) in fdt_check_header()
108 fdt_off_dt_strings(fdt), fdt_size_dt_strings(fdt))) in fdt_check_header()
123 if (fdt_version(fdt) >= 0x11) in fdt_offset_ptr()
284 FDT_RO_PROBE(fdt); in fdt_move()
[all …]
A Dfdt_ro.c54 if (fdt_version(fdt) >= 17) { in fdt_get_string()
158 return fdt_mem_rsv_(fdt, n); in fdt_mem_rsv()
165 FDT_RO_PROBE(fdt); in fdt_get_mem_rsv()
166 re = fdt_mem_rsv(fdt, n); in fdt_get_mem_rsv()
216 FDT_RO_PROBE(fdt); in fdt_subnode_offset_namelen()
242 FDT_RO_PROBE(fdt); in fdt_path_offset_namelen()
527 FDT_RO_PROBE(fdt); in fdt_get_path()
579 FDT_RO_PROBE(fdt); in fdt_supernode_atdepth_offset()
638 FDT_RO_PROBE(fdt); in fdt_node_offset_by_prop_value()
664 FDT_RO_PROBE(fdt); in fdt_node_offset_by_phandle()
[all …]
A Dlibfdt_internal.h13 int fdt_ro_probe_(const void *fdt);
14 #define FDT_RO_PROBE(fdt) \ argument
17 if ((totalsize_ = fdt_ro_probe_(fdt)) < 0) \
21 int fdt_check_node_offset_(const void *fdt, int offset);
22 int fdt_check_prop_offset_(const void *fdt, int offset);
24 int fdt_node_end_offset_(void *fdt, int nodeoffset);
28 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; in fdt_offset_ptr_()
31 static inline void *fdt_offset_ptr_w_(void *fdt, int offset) in fdt_offset_ptr_w_() argument
33 return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr_w_()
40 ((const char *)fdt + fdt_off_mem_rsvmap(fdt)); in fdt_mem_rsv_()
[all …]
A Dfdt_wip.c13 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()
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()
73 int fdt_node_end_offset_(void *fdt, int offset) in fdt_node_end_offset_() argument
78 offset = fdt_next_node(fdt, offset, &depth); in fdt_node_end_offset_()
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()
[all …]
A Dfdt_overlay.c75 ret = fdt_path_offset(fdt, path); in overlay_get_target()
123 val = fdt_getprop(fdt, node, name, &len); in overlay_phandle_add_offset()
391 phandle = fdt_get_phandle(fdt, symbol_off); in overlay_fixup_one_phandle()
655 FDT_RO_PROBE(fdt); in get_path_len()
788 ret = get_path_len(fdt, target); in overlay_symbol_update()
834 FDT_RO_PROBE(fdt); in fdt_overlay_apply()
837 ret = fdt_find_max_phandle(fdt, &delta); in fdt_overlay_apply()
849 ret = overlay_fixup_phandles(fdt, fdto); in fdt_overlay_apply()
853 ret = overlay_merge(fdt, fdto); in fdt_overlay_apply()
857 ret = overlay_symbol_update(fdt, fdto); in fdt_overlay_apply()
[all …]
A Dfdt_addresses.c14 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
63 ret = fdt_address_cells(fdt, parent); in fdt_appendprop_addrrange()
68 ret = fdt_size_cells(fdt, parent); in fdt_appendprop_addrrange()
99 return fdt_appendprop(fdt, nodeoffset, name, data, in fdt_appendprop_addrrange()
/optee_os-3.20.0/core/lib/libfdt/include/
A Dlibfdt.h236 #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) argument
237 #define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize)) argument
238 #define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct)) argument
239 #define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings)) argument
240 #define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap)) argument
241 #define fdt_version(fdt) (fdt_get_header(fdt, version)) argument
242 #define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version)) argument
243 #define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys)) argument
244 #define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings)) argument
245 #define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct)) argument
[all …]
/optee_os-3.20.0/core/drivers/clk/
A Dclk_dt.c100 status = _fdt_get_status(fdt, node); in clk_probe_clock_provider_node()
113 res = parse_clock_property(fdt, node); in clk_probe_clock_provider_node()
127 status = _fdt_get_status(fdt, child); in clk_probe_node()
134 clk_probe_node(fdt, child); in clk_probe_node()
187 clk_probe_assigned(fdt, child); in clk_probe_assigned()
189 status = _fdt_get_status(fdt, child); in clk_probe_assigned()
194 parse_assigned_clock(fdt, child); in clk_probe_assigned()
200 const void *fdt = get_secure_dt(); in clk_dt_probe() local
203 if (!fdt) in clk_dt_probe()
206 clk_probe_node(fdt, -1); in clk_dt_probe()
[all …]
/optee_os-3.20.0/core/drivers/crypto/caam/hal/common/
A Dhal_cfg_dt.c39 node = fdt_node_offset_by_compatible(fdt, node, in find_jr_offset()
42 if (_fdt_get_status(fdt, node) == status) { in find_jr_offset()
44 jr_offset = _fdt_reg_base_address(fdt, node); in find_jr_offset()
72 pctrl_base = _fdt_reg_base_address(fdt, node); in caam_hal_cfg_get_ctrl_dt()
78 size = _fdt_reg_size(fdt, node); in caam_hal_cfg_get_ctrl_dt()
100 jr_offset = find_jr_offset(fdt, DT_STATUS_OK_SEC, &node); in caam_hal_cfg_get_jobring_dt()
102 if (!is_embedded_dt(fdt)) { in caam_hal_cfg_get_jobring_dt()
104 if (dt_enable_secure_status(fdt, node)) { in caam_hal_cfg_get_jobring_dt()
111 jr_it_num = dt_get_irq(fdt, node); in caam_hal_cfg_get_jobring_dt()
127 node = fdt_node_offset_by_compatible(fdt, node, in caam_hal_cfg_disable_jobring_dt()
[all …]
A Dhal_cfg.c21 void *fdt = NULL; in caam_hal_cfg_get_conf() local
23 fdt = get_dt(); in caam_hal_cfg_get_conf()
29 if (fdt) in caam_hal_cfg_get_conf()
30 caam_hal_cfg_get_ctrl_dt(fdt, &ctrl_base); in caam_hal_cfg_get_conf()
48 if (fdt) in caam_hal_cfg_get_conf()
49 caam_hal_cfg_get_jobring_dt(fdt, jrcfg); in caam_hal_cfg_get_conf()
56 !is_embedded_dt(fdt)) { in caam_hal_cfg_get_conf()
57 if (fdt) { in caam_hal_cfg_get_conf()
59 caam_hal_cfg_disable_jobring_dt(fdt, jrcfg); in caam_hal_cfg_get_conf()
/optee_os-3.20.0/core/kernel/
A Ddt.c26 if (!fdt_node_check_compatible(fdt, offs, in dt_find_compatible_driver()
45 int dt_disable_status(void *fdt, int node) in dt_disable_status() argument
78 if (dt_disable_status(fdt, node)) { in dt_enable_secure_status()
100 st = _fdt_get_status(fdt, offs); in dt_map_dev()
104 pbase = _fdt_reg_base_address(fdt, offs); in dt_map_dev()
107 sz = _fdt_reg_size(fdt, offs); in dt_map_dev()
177 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_base_address()
185 ncells = fdt_address_cells(fdt, parent); in _fdt_reg_base_address()
200 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_size()
208 n = fdt_address_cells(fdt, parent); in _fdt_reg_size()
[all …]
A Ddt_driver.c563 print_probe_list(fdt); in add_node_to_probe()
678 const void *fdt = NULL; in probe_dt_drivers_early() local
680 fdt = get_secure_dt(); in probe_dt_drivers_early()
681 if (!fdt) in probe_dt_drivers_early()
684 parse_node(fdt, fdt_path_offset(fdt, "/")); in probe_dt_drivers_early()
689 print_probe_list(fdt); in probe_dt_drivers_early()
699 const void *fdt = NULL; in probe_dt_drivers() local
701 fdt = get_secure_dt(); in probe_dt_drivers()
702 if (!fdt) in probe_dt_drivers()
727 fdt = get_secure_dt(); in release_probe_lists()
[all …]
A Dconsole.c43 static int find_chosen_node(void *fdt) in find_chosen_node() argument
47 if (!fdt) in find_chosen_node()
50 offset = fdt_path_offset(fdt, "/secure-chosen"); in find_chosen_node()
53 offset = fdt_path_offset(fdt, "/chosen"); in find_chosen_node()
70 offs = find_chosen_node(fdt); in get_console_node_from_dt()
97 uart = fdt_get_alias(fdt, stdout_data); in get_console_node_from_dt()
102 offs = fdt_path_offset(fdt, uart); in get_console_node_from_dt()
126 void *fdt; in configure_console_from_dt() local
129 fdt = get_dt(); in configure_console_from_dt()
133 dt_drv = dt_find_compatible_driver(fdt, offs); in configure_console_from_dt()
[all …]
A Dtpm.c26 static int read_dt_tpm_log_info(void *fdt, int node, paddr_t *buf, in read_dt_tpm_log_info() argument
43 property = fdt_getprop(fdt, node, dt_tpm_event_log_addr, &len_prop); in read_dt_tpm_log_info()
50 err = fdt_setprop(fdt, node, dt_tpm_event_log_addr, &zero_addr, in read_dt_tpm_log_info()
60 property = fdt_getprop(fdt, node, "tpm_event_log_size", &len_prop); in read_dt_tpm_log_info()
72 static void get_tpm_phys_params(void *fdt __maybe_unused, in get_tpm_phys_params()
81 if (!fdt) { in get_tpm_phys_params()
86 node = fdt_node_offset_by_compatible(fdt, -1, dt_tpm_match_table); in get_tpm_phys_params()
93 if (read_dt_tpm_log_info((void *)fdt, node, addr, size) < 0) { in get_tpm_phys_params()
132 void tpm_map_log_area(void *fdt) in tpm_map_log_area() argument
137 get_tpm_phys_params(fdt, &log_addr, &tpm_log_size); in tpm_map_log_area()
/optee_os-3.20.0/core/include/kernel/
A Ddt.h154 bool dt_have_prop(const void *fdt, int offs, const char *propname);
164 int dt_disable_status(void *fdt, int node);
174 int dt_enable_secure_status(void *fdt, int node);
184 paddr_t _fdt_reg_base_address(const void *fdt, int offs);
190 size_t _fdt_reg_size(const void *fdt, int offs);
197 int _fdt_get_status(const void *fdt, int offs);
228 uint32_t _fdt_read_uint32_default(const void *fdt, int node,
238 bool _fdt_check_node(const void *fdt, int node);
243 const void *fdt __unused, in dt_find_compatible_driver()
262 static inline size_t _fdt_reg_size(const void *fdt __unused, in _fdt_reg_size()
[all …]
A Ddt_driver.h61 TEE_Result dt_driver_register_provider(const void *fdt, int nodeoffset,
84 const void *fdt, int nodeoffset,
134 TEE_Result dt_driver_probe_device_by_node(const void *fdt, int nodeoffset,
146 int fdt_get_dt_driver_cells(const void *fdt, int nodeoffset,
155 TEE_Result dt_driver_maybe_add_probe_node(const void *fdt, int nodeoffset);
/optee_os-3.20.0/core/arch/arm/plat-stm32mp1/drivers/
A Dstm32mp1_pmic.c58 void *fdt = get_embedded_dt(); in dt_pmic_status() local
60 if (fdt) { in dt_pmic_status()
341 void *fdt = NULL; in save_cpu_supply_name() local
346 fdt = get_embedded_dt(); in save_cpu_supply_name()
347 if (!fdt) in save_cpu_supply_name()
415 void *fdt = NULL; in parse_regulator_fdt_nodes() local
420 fdt = get_embedded_dt(); in parse_regulator_fdt_nodes()
421 if (!fdt) in parse_regulator_fdt_nodes()
469 void *fdt = NULL; in dt_pmic_i2c_config() local
472 fdt = get_embedded_dt(); in dt_pmic_i2c_config()
[all …]
/optee_os-3.20.0/core/drivers/pm/sam/
A Dat91_pm.c191 if (dev_is_wakeup_source(soc_pm.fdt, node)) { in at91_pm_config_ws_ulp1()
365 if (_fdt_get_status(fdt, node) == DT_STATUS_OK_SEC) in at91_pm_backup_init()
371 static TEE_Result at91_pm_sram_init(const void *fdt) in at91_pm_sram_init() argument
382 if (_fdt_get_status(fdt, node) != DT_STATUS_OK_SEC) in at91_pm_sram_init()
422 res = clk_dt_get_by_index(fdt, node, 0, &clk); in at91_securam_init()
451 soc_pm.fdt = fdt; in sama5d2_pm_init_all()
459 res = at91_securam_init(fdt); in sama5d2_pm_init_all()
463 res = at91_pm_dt_dram_init(fdt); in sama5d2_pm_init_all()
467 res = at91_pm_backup_init(fdt); in sama5d2_pm_init_all()
471 res = at91_pm_sram_init(fdt); in sama5d2_pm_init_all()
[all …]
/optee_os-3.20.0/core/drivers/
A Datmel_shdwc.c96 fdt_for_each_subnode(child, fdt, np) { in at91_shdwc_get_wakeup_input()
97 prop = fdt_getprop(fdt, child, "reg", &len); in at91_shdwc_get_wakeup_input()
100 fdt_get_name(fdt, child, NULL)); in at91_shdwc_get_wakeup_input()
119 static void at91_shdwc_dt_configure(const void *fdt, int np) in at91_shdwc_dt_configure() argument
127 prop = fdt_getprop(fdt, np, "debounce-delay-us", &len); in at91_shdwc_dt_configure()
133 if (fdt_getprop(fdt, np, "atmel,wakeup-rtc-timer", &len)) in at91_shdwc_dt_configure()
138 input = at91_shdwc_get_wakeup_input(fdt, np); in at91_shdwc_dt_configure()
155 if (_fdt_get_status(fdt, node) != DT_STATUS_OK_SEC) in atmel_shdwc_probe()
163 ddr_node = fdt_node_offset_by_compatible(fdt, -1, in atmel_shdwc_probe()
175 at91_shdwc_dt_configure(fdt, node); in atmel_shdwc_probe()
[all …]
A Dstm32_gpio.c176 if (fdt_getprop(fdt, pinctrl_subnode, in ckeck_gpio_bank()
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()
216 pinctrl_node = fdt_parent_offset(fdt, fdt_parent_offset(fdt, node)); in get_pinctrl_from_fdt()
224 if (fdt_getprop(fdt, node, "bias-pull-up", NULL)) in get_pinctrl_from_fdt()
281 ckeck_gpio_bank(fdt, bank, pinctrl_node); in get_pinctrl_from_fdt()
325 fdt_for_each_subnode(subnode, fdt, node) { in stm32_pinctrl_fdt_get_pinctrl()
334 rc = get_pinctrl_from_fdt(fdt, subnode, in stm32_pinctrl_fdt_get_pinctrl()
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 …]
/optee_os-3.20.0/core/drivers/crypto/caam/include/
A Dcaam_hal_cfg.h37 void caam_hal_cfg_get_ctrl_dt(void *fdt, vaddr_t *ctrl_base);
45 void caam_hal_cfg_get_jobring_dt(void *fdt, struct caam_jrcfg *jrcfg);
53 void caam_hal_cfg_disable_jobring_dt(void *fdt, struct caam_jrcfg *jrcfg);
55 static inline void caam_hal_cfg_get_ctrl_dt(void *fdt __unused, in caam_hal_cfg_get_ctrl_dt()
62 caam_hal_cfg_get_jobring_dt(void *fdt __unused, in caam_hal_cfg_get_jobring_dt()
70 caam_hal_cfg_disable_jobring_dt(void *fdt __unused, in caam_hal_cfg_disable_jobring_dt()
/optee_os-3.20.0/core/drivers/crypto/se050/glue/
A Di2c_stm32.c41 void *fdt = NULL; in dt_i2c_bus_config() local
44 fdt = get_embedded_dt(); in dt_i2c_bus_config()
45 if (!fdt) in dt_i2c_bus_config()
50 path = fdt_get_alias(fdt, bus); in dt_i2c_bus_config()
54 node = fdt_path_offset(fdt, path); in dt_i2c_bus_config()
58 cuint = fdt_getprop(fdt, node, "clock-frequency", NULL); in dt_i2c_bus_config()
64 return stm32_i2c_get_setup_from_fdt(fdt, node, init, pctrl, pcnt); in dt_i2c_bus_config()
/optee_os-3.20.0/core/arch/arm/plat-sam/
A Dfreq.c19 const void *fdt = get_embedded_dt(); in get_freq_from_dt() local
21 if (!fdt) in get_freq_from_dt()
24 node = fdt_node_offset_by_compatible(fdt, -1, "arm,cortex-a5"); in get_freq_from_dt()
28 if (clk_dt_get_by_name(fdt, node, "cpu", &clk)) in get_freq_from_dt()

Completed in 1558 milliseconds

1234