Home
last modified time | relevance | path

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

1234

/optee_os/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_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 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 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_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_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_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/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/core/drivers/clk/
A Dclk_dt.c99 status = _fdt_get_status(fdt, node); in clk_probe_clock_provider_node()
112 res = parse_clock_property(fdt, node); in clk_probe_clock_provider_node()
126 status = _fdt_get_status(fdt, child); in clk_probe_node()
133 clk_probe_node(fdt, child); in clk_probe_node()
186 clk_probe_assigned(fdt, child); in clk_probe_assigned()
188 status = _fdt_get_status(fdt, child); in clk_probe_assigned()
193 parse_assigned_clock(fdt, child); in clk_probe_assigned()
199 const void *fdt = get_embedded_dt(); in clk_dt_probe() local
202 if (!fdt) in clk_dt_probe()
205 clk_probe_node(fdt, -1); in clk_dt_probe()
[all …]
/optee_os/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()
99 st = _fdt_get_status(fdt, offs); in dt_map_dev()
103 pbase = _fdt_reg_base_address(fdt, offs); in dt_map_dev()
106 sz = _fdt_reg_size(fdt, offs); in dt_map_dev()
166 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_base_address()
174 ncells = fdt_address_cells(fdt, parent); in _fdt_reg_base_address()
189 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_size()
197 n = fdt_address_cells(fdt, parent); in _fdt_reg_size()
[all …]
A Ddt_driver.c454 print_probe_list(fdt); in process_probe_list()
550 print_probe_list(fdt); in add_node_to_probe()
665 const void *fdt = NULL; in probe_dt_drivers_early() local
670 fdt = get_embedded_dt(); in probe_dt_drivers_early()
671 assert(fdt); in probe_dt_drivers_early()
673 parse_node(fdt, fdt_path_offset(fdt, "/")); in probe_dt_drivers_early()
678 print_probe_list(fdt); in probe_dt_drivers_early()
688 const void *fdt = NULL; in probe_dt_drivers() local
693 fdt = get_embedded_dt(); in probe_dt_drivers()
694 assert(fdt); in probe_dt_drivers()
[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
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()
67 static void get_tpm_phys_params(void *fdt __maybe_unused, in get_tpm_phys_params()
76 if (!fdt) { in get_tpm_phys_params()
81 node = fdt_node_offset_by_compatible(fdt, -1, dt_tpm_match_table); in get_tpm_phys_params()
88 if (read_dt_tpm_log_info((void *)fdt, node, addr, size) < 0) { in get_tpm_phys_params()
120 void tpm_map_log_area(void *fdt) in tpm_map_log_area() argument
125 get_tpm_phys_params(fdt, &log_addr, &tpm_log_size); in tpm_map_log_area()
/optee_os/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()
49 if (fdt) in caam_hal_cfg_get_conf()
50 caam_hal_cfg_get_jobring_dt(fdt, jrcfg); in caam_hal_cfg_get_conf()
57 !is_embedded_dt(fdt)) { in caam_hal_cfg_get_conf()
58 if (fdt) { in caam_hal_cfg_get_conf()
60 caam_hal_cfg_disable_jobring_dt(fdt, jrcfg); in caam_hal_cfg_get_conf()
/optee_os/core/include/kernel/
A Ddt.h141 bool dt_have_prop(const void *fdt, int offs, const char *propname);
151 int dt_disable_status(void *fdt, int node);
161 int dt_enable_secure_status(void *fdt, int node);
171 paddr_t _fdt_reg_base_address(const void *fdt, int offs);
177 size_t _fdt_reg_size(const void *fdt, int offs);
184 int _fdt_get_status(const void *fdt, int offs);
194 void _fdt_fill_device_info(const void *fdt, struct dt_node_info *info,
200 const void *fdt __unused, in dt_find_compatible_driver()
212 static inline paddr_t _fdt_reg_base_address(const void *fdt __unused, in _fdt_reg_base_address()
218 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,
83 const void *fdt, int nodeoffset,
133 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/core/arch/arm/plat-stm32mp1/drivers/
A Dstm32mp1_pmic.c57 void *fdt = get_embedded_dt(); in dt_pmic_status() local
59 if (fdt) { in dt_pmic_status()
340 void *fdt = NULL; in save_cpu_supply_name() local
345 fdt = get_embedded_dt(); in save_cpu_supply_name()
346 if (!fdt) in save_cpu_supply_name()
414 void *fdt = NULL; in parse_regulator_fdt_nodes() local
419 fdt = get_embedded_dt(); in parse_regulator_fdt_nodes()
420 if (!fdt) in parse_regulator_fdt_nodes()
468 void *fdt = NULL; in dt_pmic_i2c_config() local
471 fdt = get_embedded_dt(); in dt_pmic_i2c_config()
[all …]
/optee_os/core/drivers/
A Datmel_shdwc.c93 fdt_for_each_subnode(child, fdt, np) { in at91_shdwc_get_wakeup_input()
94 prop = fdt_getprop(fdt, child, "reg", &len); in at91_shdwc_get_wakeup_input()
97 fdt_get_name(fdt, child, NULL)); in at91_shdwc_get_wakeup_input()
116 static void at91_shdwc_dt_configure(const void *fdt, int np) in at91_shdwc_dt_configure() argument
124 prop = fdt_getprop(fdt, np, "debounce-delay-us", &len); in at91_shdwc_dt_configure()
130 if (fdt_getprop(fdt, np, "atmel,wakeup-rtc-timer", &len)) in at91_shdwc_dt_configure()
135 input = at91_shdwc_get_wakeup_input(fdt, np); in at91_shdwc_dt_configure()
152 if (dt_map_dev(fdt, node, &shdwc_base, &size) < 0) in atmel_shdwc_probe()
155 ddr_node = fdt_node_offset_by_compatible(fdt, -1, in atmel_shdwc_probe()
160 if (dt_map_dev(fdt, ddr_node, &mpddrc_base, &size) < 0) 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 …]
A Dimx_wdog.c98 void *fdt = NULL; in imx_wdog_base() local
106 fdt = get_dt(); in imx_wdog_base()
107 if (!fdt) { in imx_wdog_base()
117 off = fdt_node_offset_by_compatible(fdt, off, match); in imx_wdog_base()
119 st = _fdt_get_status(fdt, off); in imx_wdog_base()
138 ext_reset_output = dt_have_prop(fdt, found_off, in imx_wdog_base()
141 if (dt_map_dev(fdt, found_off, &vbase, &sz) < 0) { in imx_wdog_base()
/optee_os/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/core/arch/arm/kernel/
A Dboot.c574 void *fdt = get_embedded_dt(); in get_dt() local
576 if (!fdt) in get_dt()
577 fdt = get_external_dt(); in get_dt()
579 return fdt; in get_dt()
1072 void *fdt; in init_external_dt() local
1089 if (!fdt) in init_external_dt()
1092 dt->blob = fdt; in init_external_dt()
1101 ret = fdt_open_into(fdt, fdt, CFG_DTB_MAX_SIZE); in init_external_dt()
1167 void *fdt = get_external_dt(); in discover_nsec_memory() local
1169 if (fdt) { in discover_nsec_memory()
[all …]
/optee_os/core/arch/arm/include/kernel/
A Dboot.h49 void boot_init_primary_late(unsigned long fdt);
88 unsigned long get_aslr_seed(void *fdt);
93 static inline bool is_embedded_dt(void *fdt) in is_embedded_dt() argument
95 return fdt && fdt == get_embedded_dt(); in is_embedded_dt()

Completed in 60 milliseconds

1234