Lines Matching refs:fit

36 static int spl_fit_get_image_name(const void *fit, int images,  in spl_fit_get_image_name()  argument
45 conf_node = fit_find_config_node(fit); in spl_fit_get_image_name()
49 for (node = fdt_first_subnode(fit, conf_node); in spl_fit_get_image_name()
51 node = fdt_next_subnode(fit, node)) { in spl_fit_get_image_name()
52 name = fdt_getprop(fit, node, "description", &len); in spl_fit_get_image_name()
59 name = fdt_getprop(fit, conf_node, type, &len); in spl_fit_get_image_name()
90 static int spl_fit_get_image_node(const void *fit, int images, in spl_fit_get_image_node() argument
97 err = spl_fit_get_image_name(fit, images, type, index, &str); in spl_fit_get_image_node()
103 node = fdt_subnode_offset(fit, images, str); in spl_fit_get_image_node()
168 void *fit, ulong base_offset, int node, in spl_load_fit_image() argument
185 if (fit_image_get_comp(fit, node, &image_comp)) in spl_load_fit_image()
190 if (fit_image_get_type(fit, node, &type)) in spl_load_fit_image()
195 fit_image_get_comp(fit, node, &image_comp); in spl_load_fit_image()
198 if (fit_image_get_load(fit, node, &load_addr)) in spl_load_fit_image()
203 if (fit_image_get_comp_addr(fit, node, &comp_addr)) in spl_load_fit_image()
209 if (!fit_image_get_data_position(fit, node, &offset)) { in spl_load_fit_image()
211 } else if (!fit_image_get_data_offset(fit, node, &offset)) { in spl_load_fit_image()
218 if (fit_image_get_data_size(fit, node, &len)) in spl_load_fit_image()
242 if (fit_image_get_data(fit, node, &data, &length)) { in spl_load_fit_image()
254 fit_get_name(fit, node, NULL), load_addr, in spl_load_fit_image()
255 (char *)fdt_getprop(fit, node, FIT_COMP_PROP, NULL), in spl_load_fit_image()
259 fit_get_name(fit, node, NULL), load_addr); in spl_load_fit_image()
263 fit_image_print(fit, node, ""); in spl_load_fit_image()
265 if (!fit_image_verify_with_data(fit, node, in spl_load_fit_image()
270 board_fit_image_post_process(fit, node, (ulong *)&load_addr, in spl_load_fit_image()
293 image_info->entry_point = fdt_getprop_u32(fit, node, "entry"); in spl_load_fit_image()
301 void *fit, int images, ulong base_offset) in spl_fit_append_fdt() argument
307 node = spl_fit_get_image_node(fit, images, FIT_FDT_PROP, 0); in spl_fit_append_fdt()
318 ret = spl_load_fit_image(info, sector, fit, base_offset, node, in spl_fit_append_fdt()
337 node = spl_fit_get_image_node(fit, images, FIT_FDT_PROP, 1); in spl_fit_append_fdt()
345 ret = spl_load_fit_image(info, sector, fit, base_offset, node, in spl_fit_append_fdt()
351 static int spl_fit_record_loadable(const void *fit, int images, int index, in spl_fit_record_loadable() argument
359 ret = spl_fit_get_image_name(fit, images, "loadables", in spl_fit_record_loadable()
364 node = spl_fit_get_image_node(fit, images, "loadables", index); in spl_fit_record_loadable()
368 fdt_getprop(fit, node, "type", NULL), in spl_fit_record_loadable()
369 fdt_getprop(fit, node, "os", NULL)); in spl_fit_record_loadable()
374 static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os) in spl_fit_image_get_os() argument
379 return fit_image_get_os(fit, noffset, os); in spl_fit_image_get_os()
396 void *fit; in spl_fit_load_blob() local
424 fit = (void *)((CONFIG_SYS_TEXT_BASE - size - info->bl_len - in spl_fit_load_blob()
427 count = info->read(info, sector, sectors, fit); in spl_fit_load_blob()
429 mtd_blk_map_fit(info->dev, sector, fit); in spl_fit_load_blob()
432 sector, sectors, fit, count); in spl_fit_load_blob()
436 return fit; in spl_fit_load_blob()
467 void *fit; in spl_load_kernel_fit() local
497 fit = spl_fit_load_blob(info, sector, fit_header, &base_offset); in spl_load_kernel_fit()
498 if (!fit) { in spl_load_kernel_fit()
507 conf_noffset = fit_conf_get_node(fit, NULL); in spl_load_kernel_fit()
513 ret = fit_config_verify(fit, conf_noffset); in spl_load_kernel_fit()
520 images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH); in spl_load_kernel_fit()
528 node = spl_fit_get_image_node(fit, images_noffset, in spl_load_kernel_fit()
535 ret = spl_load_fit_image(info, sector, fit, base_offset, in spl_load_kernel_fit()
590 void *fit; in spl_internal_load_simple_fit() local
592 fit = spl_fit_load_blob(info, sector, fit_header, &base_offset); in spl_internal_load_simple_fit()
593 if (!fit) { in spl_internal_load_simple_fit()
599 images = fdt_path_offset(fit, FIT_IMAGES_PATH); in spl_internal_load_simple_fit()
616 conf_noffset = fit_conf_get_node(fit, NULL); in spl_internal_load_simple_fit()
622 ret = fit_config_verify(fit, conf_noffset); in spl_internal_load_simple_fit()
632 ret = fit_rollback_index_verify(fit, FIT_ROLLBACK_INDEX_SPL, in spl_internal_load_simple_fit()
655 node = spl_fit_get_image_node(fit, images, in spl_internal_load_simple_fit()
660 ret = spl_load_fit_image(info, sector, fit, base_offset, in spl_internal_load_simple_fit()
665 ret = fit_get_desc(fit, node, &desc); in spl_internal_load_simple_fit()
688 node = spl_fit_get_image_node(fit, images, FIT_FIRMWARE_PROP, in spl_internal_load_simple_fit()
692 node = spl_fit_get_image_node(fit, images, FIT_KERNEL_PROP, 0); in spl_internal_load_simple_fit()
696 node = spl_fit_get_image_node(fit, images, "loadables", 0); in spl_internal_load_simple_fit()
710 ret = spl_load_fit_image(info, sector, fit, base_offset, node, in spl_internal_load_simple_fit()
719 if (!spl_fit_image_get_os(fit, node, &spl_image->os)) in spl_internal_load_simple_fit()
731 spl_fit_append_fdt(spl_image, info, sector, fit, in spl_internal_load_simple_fit()
738 node = spl_fit_get_image_node(fit, images, "loadables", index); in spl_internal_load_simple_fit()
742 if (!spl_fit_image_get_os(fit, node, &os_type)) in spl_internal_load_simple_fit()
750 ret = spl_load_fit_image(info, sector, fit, base_offset, node, in spl_internal_load_simple_fit()
762 fit, images, base_offset); in spl_internal_load_simple_fit()
776 spl_fit_record_loadable(fit, images, index, in spl_internal_load_simple_fit()
793 struct spl_load_info *info, ulong sector, void *fit) in spl_load_simple_fit() argument
809 if (info->read(info, sector_offs, 1, fit) != 1) { in spl_load_simple_fit()
815 if (image_get_magic(fit) != FDT_MAGIC) { in spl_load_simple_fit()
821 sector_offs, fit); in spl_load_simple_fit()