/tf-a-ffa_el3_spmc/lib/libfdt/ |
A D | fdt_sw.c | 71 fdt_off_dt_strings(fdt) != fdt_totalsize(fdt)) in fdt_sw_probe_struct_() 99 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt) in fdt_grab_space_() 113 void *fdt = buf; in fdt_create_with_flags() local 137 fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt)); in fdt_create_with_flags() 158 headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in fdt_resize() 168 oldtail = (char *)fdt + fdt_totalsize(fdt) - tailsize; in fdt_resize() 215 fdt_set_off_dt_strings(fdt, fdt_totalsize(fdt)); in fdt_finish_reservemap() 252 char *strtab = (char *)fdt + fdt_totalsize(fdt); in fdt_add_string_() 258 struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in fdt_add_string_() 278 char *strtab = (char *)fdt + fdt_totalsize(fdt); in fdt_find_add_string_() [all …]
|
A D | fdt_rw.c | 22 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt))); in fdt_blocks_misordered_() 51 return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in fdt_data_size_() 78 fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta); in fdt_splice_mem_rsv_() 79 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta); in fdt_splice_mem_rsv_() 92 fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta); in fdt_splice_struct_() 93 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta); in fdt_splice_struct_() 108 + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in fdt_splice_string_() 129 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt); in fdt_find_add_string_() 162 re = fdt_mem_rsv_w_(fdt, fdt_num_mem_rsv(fdt)); in fdt_add_mem_rsv() 488 fdt_packblocks_(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt)); in fdt_pack() [all …]
|
A D | fdt.c | 25 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_ro_probe_() 30 if (fdt_last_comp_version(fdt) > in fdt_ro_probe_() 96 if (fdt_version(fdt) < fdt_last_comp_version(fdt)) in fdt_check_header() 99 hdrsize = fdt_header_size(fdt); in fdt_check_header() 108 fdt_off_mem_rsvmap(fdt))) in fdt_check_header() 116 fdt_off_dt_struct(fdt))) in fdt_check_header() 120 fdt_off_dt_struct(fdt), in fdt_check_header() 121 fdt_size_dt_struct(fdt))) in fdt_check_header() 127 fdt_off_dt_strings(fdt), in fdt_check_header() 320 FDT_RO_PROBE(fdt); in fdt_move() [all …]
|
A D | fdt_ro.c | 43 s = (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset; in fdt_get_string() 49 totalsize = fdt_ro_probe_(fdt); in fdt_get_string() 179 FDT_RO_PROBE(fdt); in fdt_get_mem_rsv() 180 re = fdt_mem_rsv(fdt, n); in fdt_get_mem_rsv() 230 FDT_RO_PROBE(fdt); in fdt_subnode_offset_namelen() 256 FDT_RO_PROBE(fdt); in fdt_path_offset_namelen() 548 FDT_RO_PROBE(fdt); in fdt_get_path() 600 FDT_RO_PROBE(fdt); in fdt_supernode_atdepth_offset() 662 FDT_RO_PROBE(fdt); in fdt_node_offset_by_prop_value() 688 FDT_RO_PROBE(fdt); in fdt_node_offset_by_phandle() [all …]
|
A D | libfdt_internal.h | 13 int32_t 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 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() 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 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 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()
|
A D | fdt_overlay.c | 75 ret = fdt_path_offset(fdt, path); in overlay_get_target() 123 val = fdt_getprop(fdt, node, name, &len); in overlay_phandle_add_offset() 392 phandle = fdt_get_phandle(fdt, symbol_off); in overlay_fixup_one_phandle() 656 FDT_RO_PROBE(fdt); in get_path_len() 789 ret = get_path_len(fdt, target); in overlay_symbol_update() 835 FDT_RO_PROBE(fdt); in fdt_overlay_apply() 838 ret = fdt_find_max_phandle(fdt, &delta); in fdt_overlay_apply() 850 ret = overlay_fixup_phandles(fdt, fdto); in fdt_overlay_apply() 854 ret = overlay_merge(fdt, fdto); in fdt_overlay_apply() 858 ret = overlay_symbol_update(fdt, fdto); in fdt_overlay_apply() [all …]
|
/tf-a-ffa_el3_spmc/include/lib/libfdt/ |
A D | libfdt.h | 240 #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) argument 241 #define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize)) argument 242 #define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct)) argument 243 #define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings)) argument 244 #define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap)) argument 245 #define fdt_version(fdt) (fdt_get_header(fdt, version)) argument 246 #define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version)) argument 247 #define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys)) argument 248 #define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings)) argument 249 #define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct)) argument [all …]
|
/tf-a-ffa_el3_spmc/drivers/st/clk/ |
A D | stm32mp_clkfunc.c | 26 void *fdt; in fdt_osc_read_freq() local 28 if (fdt_get_address(&fdt) == 0) { in fdt_osc_read_freq() 75 void *fdt; in fdt_osc_read_bool() local 123 void *fdt; in fdt_osc_read_uint32_default() local 180 void *fdt; in fdt_rcc_read_uint32_array() local 186 node = fdt_get_rcc_node(fdt); in fdt_rcc_read_uint32_array() 202 void *fdt; in fdt_rcc_subnode_offset() local 208 node = fdt_get_rcc_node(fdt); in fdt_rcc_subnode_offset() 231 void *fdt; in fdt_rcc_read_prop() local 258 void *fdt; in fdt_get_rcc_secure_status() local [all …]
|
/tf-a-ffa_el3_spmc/plat/allwinner/sun50i_h616/ |
A D | prepare_dtb.c | 15 void sunxi_prepare_dtb(void *fdt) in sunxi_prepare_dtb() argument 19 if (fdt == NULL || fdt_check_header(fdt) != 0) { in sunxi_prepare_dtb() 22 ret = fdt_open_into(fdt, fdt, 0x100000); in sunxi_prepare_dtb() 24 ERROR("Preparing devicetree at %p: error %d\n", fdt, ret); in sunxi_prepare_dtb() 29 if (fdt_add_reserved_memory(fdt, "tf-a@40000000", BL31_BASE, in sunxi_prepare_dtb() 35 ret = fdt_pack(fdt); in sunxi_prepare_dtb() 38 fdt, ret); in sunxi_prepare_dtb() 40 clean_dcache_range((uintptr_t)fdt, fdt_blob_size(fdt)); in sunxi_prepare_dtb()
|
/tf-a-ffa_el3_spmc/plat/arm/board/fvp/ |
A D | jmptbl.i | 18 fdt fdt_getprop 19 fdt fdt_get_property 22 fdt fdt_check_header 25 fdt fdt_first_subnode 26 fdt fdt_next_subnode 27 fdt fdt_path_offset 30 fdt fdt_address_cells 31 fdt fdt_size_cells 32 fdt fdt_parent_offset 35 fdt fdt_get_name [all …]
|
/tf-a-ffa_el3_spmc/plat/arm/board/juno/ |
A D | jmptbl.i | 18 fdt fdt_getprop 19 fdt fdt_get_property 22 fdt fdt_check_header 25 fdt fdt_first_subnode 26 fdt fdt_next_subnode 27 fdt fdt_parent_offset 30 fdt fdt_path_offset 32 fdt fdt_address_cells 33 fdt fdt_size_cells 34 fdt fdt_get_name [all …]
|
/tf-a-ffa_el3_spmc/plat/st/common/ |
A D | stm32mp_dt.c | 22 static void *fdt; variable 34 fdt = (void *)dt_addr; in dt_open_and_check() 47 if (fdt == NULL) { in fdt_get_address() 51 *fdt_addr = fdt; in fdt_get_address() 65 cchar = fdt_get_name(fdt, node, &len); in fdt_check_node() 109 parent = fdt_parent_offset(fdt, node); in fdt_get_node_parent_address_cells() 114 return fdt_address_cells(fdt, parent); in fdt_get_node_parent_address_cells() 127 node = fdt_get_stdout_node_offset(fdt); in dt_set_stdout_pinctrl() 144 cuint = fdt_getprop(fdt, node, "reg", NULL); in dt_fill_device_info() 196 node = fdt_get_stdout_node_offset(fdt); in dt_get_stdout_uart_info() [all …]
|
/tf-a-ffa_el3_spmc/drivers/allwinner/axp/ |
A D | common.c | 82 mvolt = fdt_get_regulator_millivolt(fdt, node); in setup_regulator() 102 cell = fdt_getprop(fdt, node, "status", NULL); in is_node_disabled() 111 if (is_node_disabled(fdt, node)) { in should_enable_regulator() 128 node = fdt_node_offset_by_compatible(fdt, -1, in board_uses_usb0_host_mode() 142 void axp_setup_regulators(const void *fdt) in axp_setup_regulators() argument 147 if (fdt == NULL) in axp_setup_regulators() 159 board_uses_usb0_host_mode(fdt)) { in axp_setup_regulators() 173 fdt_for_each_subnode(node, fdt, node) { in axp_setup_regulators() 179 if (!should_enable_regulator(fdt, node)) in axp_setup_regulators() 182 name = fdt_get_name(fdt, node, &length); in axp_setup_regulators() [all …]
|
/tf-a-ffa_el3_spmc/plat/arm/board/arm_fpga/ |
A D | fpga_bl31_setup.c | 141 err = fdt_open_into(fdt, fdt, FPGA_MAX_DTB_SIZE); in fpga_prepare_dtb() 153 chosen = fdt_add_subnode(fdt, 0, "chosen"); in fpga_prepare_dtb() 155 chosen = fdt_path_offset(fdt, "/chosen"); in fpga_prepare_dtb() 188 err = fdt_setprop(fdt, chosen, "bootargs", in fpga_prepare_dtb() 191 err = fdt_appendprop(fdt, chosen, "bootargs", in fpga_prepare_dtb() 205 err = fdt_add_cpus_node(fdt, FPGA_MAX_PE_PER_CPU, in fpga_prepare_dtb() 220 err = fdt_adjust_gic_redist(fdt, nr_cores, in fpga_prepare_dtb() 230 int node = fdt_node_offset_by_compatible(fdt, 0, in fpga_prepare_dtb() 234 fdt_del_node(fdt, node); in fpga_prepare_dtb() 238 err = fdt_pack(fdt); in fpga_prepare_dtb() [all …]
|
A D | fpga_console.c | 20 const void *fdt = (void *)(uintptr_t)FPGA_PRELOADED_DTB_BASE; in fpga_console_init() local 29 node = fdt_get_stdout_node_offset(fdt); in fpga_console_init() 31 fdt_get_reg_props_by_index(fdt, node, 0, &base_addr, NULL); in fpga_console_init()
|
/tf-a-ffa_el3_spmc/plat/arm/css/sgi/ |
A D | sgi_image_load.c | 27 void *fdt; in plat_sgi_append_config_node() local 37 fdt = (void *)(mem_params->image_info.image_base); in plat_sgi_append_config_node() 40 if (fdt_check_header(fdt) != 0) { in plat_sgi_append_config_node() 45 nodeoffset = fdt_subnode_offset(fdt, 0, "system-id"); in plat_sgi_append_config_node() 52 err = fdt_setprop_u32(fdt, nodeoffset, "platform-id", platid); in plat_sgi_append_config_node() 59 err = fdt_setprop_u32(fdt, nodeoffset, "config-id", platcfg); in plat_sgi_append_config_node() 66 err = fdt_setprop_u32(fdt, nodeoffset, "multi-chip-mode", platcfg); in plat_sgi_append_config_node() 72 flush_dcache_range((uintptr_t)fdt, mem_params->image_info.image_size); in plat_sgi_append_config_node()
|
/tf-a-ffa_el3_spmc/drivers/st/pmic/ |
A D | stm32mp_pmic.c | 35 static int dt_get_pmic_node(void *fdt) in dt_get_pmic_node() argument 43 void *fdt; in dt_pmic_status() local 45 if (fdt_get_address(&fdt) == 0) { in dt_pmic_status() 49 node = dt_get_pmic_node(fdt); in dt_pmic_status() 74 void *fdt; in dt_pmic_i2c_config() local 77 if (fdt_get_address(&fdt) == 0) { in dt_pmic_i2c_config() 81 pmic_node = dt_get_pmic_node(fdt); in dt_pmic_i2c_config() 112 void *fdt; local 114 if (fdt_get_address(&fdt) == 0) { 118 pmic_node = dt_get_pmic_node(fdt); [all …]
|
/tf-a-ffa_el3_spmc/common/ |
A D | fdt_fixup.c | 64 int dt_add_psci_node(void *fdt) in dt_add_psci_node() argument 68 if (fdt_path_offset(fdt, "/psci") >= 0) { in dt_add_psci_node() 73 offs = fdt_path_offset(fdt, "/"); in dt_add_psci_node() 76 offs = fdt_add_subnode(fdt, offs, "psci"); in dt_add_psci_node() 83 if (append_psci_compatible(fdt, offs, "arm,psci")) in dt_add_psci_node() 85 if (fdt_setprop_string(fdt, offs, "method", "smc")) in dt_add_psci_node() 114 offs = fdt_next_subnode(fdt, offs)) { in dt_update_one_cpu_node() 119 prop = fdt_getprop(fdt, offs, "device_type", &len); in dt_update_one_cpu_node() 158 int dt_add_psci_cpu_enable_methods(void *fdt) in dt_add_psci_cpu_enable_methods() argument 163 offs = fdt_path_offset(fdt, "/cpus"); in dt_add_psci_cpu_enable_methods() [all …]
|
/tf-a-ffa_el3_spmc/plat/common/ |
A D | plat_spmd_manifest.c | 25 const void *fdt, in manifest_parse_attribute() argument 31 assert((attr != NULL) && (fdt != NULL)); in manifest_parse_attribute() 33 rc = fdt_read_uint32(fdt, node, "maj_ver", &attr->major_version); in manifest_parse_attribute() 40 rc = fdt_read_uint32(fdt, node, "min_ver", &attr->minor_version); in manifest_parse_attribute() 47 rc = fdt_read_uint32(fdt, node, "spmc_id", &val32); in manifest_parse_attribute() 55 rc = fdt_read_uint32(fdt, node, "exec_state", &attr->exec_state); in manifest_parse_attribute() 61 rc = fdt_read_uint32(fdt, node, "binary_size", &attr->binary_size); in manifest_parse_attribute() 67 rc = fdt_read_uint64(fdt, node, "load_address", &attr->load_address); in manifest_parse_attribute() 73 rc = fdt_read_uint64(fdt, node, "entrypoint", &attr->entrypoint); in manifest_parse_attribute() 93 const void *fdt, in manifest_parse_root() argument [all …]
|
/tf-a-ffa_el3_spmc/drivers/st/gpio/ |
A D | stm32_gpio.c | 37 fdt_for_each_subnode(pinctrl_subnode, fdt, pinctrl_node) { in ckeck_gpio_bank() 40 if (fdt_getprop(fdt, pinctrl_subnode, in ckeck_gpio_bank() 45 cuint = fdt_getprop(fdt, pinctrl_subnode, "reg", NULL); in ckeck_gpio_bank() 73 cuint = fdt_getprop(fdt, node, "pinmux", &len); in dt_set_gpio_config() 78 pinctrl_node = fdt_parent_offset(fdt, fdt_parent_offset(fdt, node)); in dt_set_gpio_config() 83 slewrate = fdt_getprop(fdt, node, "slew-rate", NULL); in dt_set_gpio_config() 134 bank_node = ckeck_gpio_bank(fdt, bank, pinctrl_node); in dt_set_gpio_config() 165 void *fdt; in dt_set_pinctrl_config() local 167 if (fdt_get_address(&fdt) == 0) { in dt_set_pinctrl_config() 176 cuint = fdt_getprop(fdt, node, "pinctrl-0", &lenp); in dt_set_pinctrl_config() [all …]
|
/tf-a-ffa_el3_spmc/drivers/mtd/spi-mem/ |
A D | spi_mem.c | 200 fdt_for_each_subnode(bus_subnode, fdt, bus_node) { in spi_mem_init_slave() 209 fdt_for_each_subnode(bus_subnode, fdt, bus_node) { in spi_mem_init_slave() 211 cuint = fdt_getprop(fdt, bus_subnode, "reg", NULL); in spi_mem_init_slave() 220 cuint = fdt_getprop(fdt, bus_subnode, in spi_mem_init_slave() 227 if ((fdt_getprop(fdt, bus_subnode, "spi-cpol", NULL)) != NULL) { in spi_mem_init_slave() 230 if ((fdt_getprop(fdt, bus_subnode, "spi-cpha", NULL)) != NULL) { in spi_mem_init_slave() 233 if ((fdt_getprop(fdt, bus_subnode, "spi-cs-high", NULL)) != in spi_mem_init_slave() 237 if ((fdt_getprop(fdt, bus_subnode, "spi-3wire", NULL)) != in spi_mem_init_slave() 241 if ((fdt_getprop(fdt, bus_subnode, "spi-half-duplex", NULL)) != in spi_mem_init_slave() 247 cuint = fdt_getprop(fdt, bus_subnode, "spi-tx-bus-width", NULL); in spi_mem_init_slave() [all …]
|
/tf-a-ffa_el3_spmc/plat/allwinner/common/ |
A D | sunxi_bl31_setup.c | 116 void *fdt; in bl31_platform_setup() local 142 fdt = sunxi_find_dtb(); in bl31_platform_setup() 143 if (fdt) { in bl31_platform_setup() 147 model = fdt_getprop(fdt, 0, "model", &length); in bl31_platform_setup() 148 NOTICE("BL31: Found U-Boot DTB at %p, model: %s\n", fdt, in bl31_platform_setup() 181 sunxi_pmic_setup(soc_id, fdt); in bl31_platform_setup() 183 sunxi_prepare_dtb(fdt); in bl31_platform_setup()
|
/tf-a-ffa_el3_spmc/plat/st/stm32mp1/ |
A D | stm32mp1_gic.c | 47 void *fdt; in stm32mp1_gic_init() local 51 if (fdt_get_address(&fdt) == 0) { in stm32mp1_gic_init() 62 cuint = fdt_getprop(fdt, node, "reg", NULL); in stm32mp1_gic_init() 69 cuint = fdt_getprop(fdt, node, "#interrupt-cells", NULL); in stm32mp1_gic_init() 76 stm32_gic.phandle_node = fdt_get_phandle(fdt, node); in stm32mp1_gic_init()
|