Lines Matching full:if
48 if (conf_node < 0) { in spl_fit_get_image_name()
62 if (!name) { in spl_fit_get_image_name()
70 if (!str || (str - name >= len)) { in spl_fit_get_image_name()
100 if (err) in spl_fit_get_image_node()
106 if (node < 0) { in spl_fit_get_image_node()
117 * If it is a FS read, get the first address before offset which is in get_aligned_image_offset()
118 * aligned to ARCH_DMA_MINALIGN. If it is raw read return the in get_aligned_image_offset()
121 if (info->filename) in get_aligned_image_offset()
130 * If it is a FS read, get the difference between the offset and in get_aligned_image_overhead()
132 * ARCH_DMA_MINALIGN. If it is raw read return the offset within the in get_aligned_image_overhead()
135 if (info->filename) in get_aligned_image_overhead()
146 if (info->filename) in get_aligned_image_size()
168 if (!node_name) { in spl_fit_image_uncipher()
174 if (cipher_noffset < 0) { in spl_fit_image_uncipher()
180 if (fit_image_cipher_get_algo(fit, cipher_noffset, &algo_name)) { in spl_fit_image_uncipher()
186 if (strcmp(algo_name, "aes128")) { in spl_fit_image_uncipher()
192 if (!iv) { in spl_fit_image_uncipher()
197 if (iv_len != key_len) { in spl_fit_image_uncipher()
213 if (!dev) { in spl_fit_image_uncipher()
222 if (ret) { in spl_fit_image_uncipher()
243 * If the FIT node does not contain a "load" (address) property,
266 if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) { in spl_load_fit_image()
267 if (fit_image_get_comp(fit, node, &image_comp)) in spl_load_fit_image()
272 if (fit_image_get_type(fit, node, &type)) in spl_load_fit_image()
280 if (fit_image_get_load(fit, node, &load_addr)) in spl_load_fit_image()
283 if (image_comp != IH_COMP_NONE && image_comp != IH_COMP_ZIMAGE) { in spl_load_fit_image()
285 if (fit_image_get_comp_addr(fit, node, &comp_addr)) in spl_load_fit_image()
294 if (fit_image_get_cipher_addr(fit, node, &cipher_addr)) in spl_load_fit_image()
298 if (!fit_image_get_data_position(fit, node, &offset)) { in spl_load_fit_image()
300 } else if (!fit_image_get_data_offset(fit, node, &offset)) { in spl_load_fit_image()
305 if (external_data) { in spl_load_fit_image()
307 if (fit_image_get_data_size(fit, node, &len)) in spl_load_fit_image()
311 #if defined(CONFIG_ARCH_ROCKCHIP) in spl_load_fit_image()
312 if ((load_ptr < CONFIG_SYS_SDRAM_BASE) || in spl_load_fit_image()
321 if (info->read(info, in spl_load_fit_image()
331 if (fit_image_get_data(fit, node, &data, &length)) { in spl_load_fit_image()
341 if (image_comp != IH_COMP_NONE && image_comp != IH_COMP_ZIMAGE) in spl_load_fit_image()
354 if (!fit_image_verify_with_data(fit, node, in spl_load_fit_image()
359 if (fdt_subnode_offset(fit, node, FIT_CIPHER_NODENAME) > 0) { in spl_load_fit_image()
362 if (spl_fit_image_uncipher(fit, node, cipher_addr, length, (ulong)src)) in spl_load_fit_image()
369 if (board_fit_image_post_process(fit, node, (ulong *)&load_addr, in spl_load_fit_image()
375 if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && in spl_load_fit_image()
380 if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN, in spl_load_fit_image()
390 if (image_info) { in spl_load_fit_image()
408 if (node < 0) { in spl_fit_append_fdt()
421 if (ret < 0) in spl_fit_append_fdt()
426 #if !CONFIG_IS_ENABLED(FIT_IMAGE_TINY) in spl_fit_append_fdt()
432 * If need, load kernel FDT right after U-Boot FDT. in spl_fit_append_fdt()
434 * kernel FDT is for U-Boot if there is not valid one in spl_fit_append_fdt()
438 if (node < 0) { in spl_fit_append_fdt()
456 #if !CONFIG_IS_ENABLED(FIT_IMAGE_TINY) in spl_fit_record_loadable()
462 if (ret < 0) in spl_fit_record_loadable()
477 #if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) in spl_fit_image_get_os()
529 #if defined(CONFIG_SPL_MTD_SUPPORT) && !defined(CONFIG_FPGA_RAM) in spl_fit_load_blob()
534 if (count == 0) in spl_fit_load_blob()
557 if (node < 0) in spl_fit_get_kernel_dtb()
560 if(!strcmp(name, "fdt")) in spl_fit_get_kernel_dtb()
562 #if defined(CONFIG_SPL_ROCKCHIP_HWID_DTB) in spl_fit_get_kernel_dtb()
563 if (spl_find_hwid_dtb(name)) { in spl_fit_get_kernel_dtb()
594 if (spl_image->next_stage != SPL_NEXT_STAGE_KERNEL) in spl_load_kernel_fit()
602 if (part_get_info_by_name(info->dev, part_name, &part_info) <= 0) { in spl_load_kernel_fit()
612 if (info->read(info, sector, 1, &fit_header) != 1) { in spl_load_kernel_fit()
617 if (image_get_magic((void *)&fit_header) != FDT_MAGIC) { in spl_load_kernel_fit()
623 if (!fit) { in spl_load_kernel_fit()
628 /* verify the configure node by keys, if required */ in spl_load_kernel_fit()
633 if (conf_noffset <= 0) { in spl_load_kernel_fit()
639 if (ret) { in spl_load_kernel_fit()
646 if (images_noffset < 0) { in spl_load_kernel_fit()
653 if (!strcmp(images[i], FIT_FDT_PROP)) in spl_load_kernel_fit()
658 if (node < 0) { in spl_load_kernel_fit()
665 if (ret) in spl_load_kernel_fit()
669 if (!strcmp(images[i], FIT_FDT_PROP)) { in spl_load_kernel_fit()
671 if (spl_fdt_chosen_bootargs(info, (void *)image_info.load_addr)) { in spl_load_kernel_fit()
675 } else if (!strcmp(images[i], FIT_KERNEL_PROP)) { in spl_load_kernel_fit()
676 #if CONFIG_IS_ENABLED(OPTEE) in spl_load_kernel_fit()
679 #if CONFIG_IS_ENABLED(ATF) in spl_load_kernel_fit()
682 } else if (!strcmp(images[i], FIT_RAMDISK_PROP)) { in spl_load_kernel_fit()
691 #if CONFIG_IS_ENABLED(OPTEE) in spl_load_kernel_fit()
694 #if CONFIG_IS_ENABLED(ATF) in spl_load_kernel_fit()
708 #if CONFIG_IS_ENABLED(ATF) in spl_internal_load_simple_fit()
718 if (!fit) { in spl_internal_load_simple_fit()
725 if (images < 0) { in spl_internal_load_simple_fit()
730 /* if board sigs verify required, check self */ in spl_internal_load_simple_fit()
731 if (fit_board_verify_required_sigs() && in spl_internal_load_simple_fit()
737 /* verify the configure node by keys, if required */ in spl_internal_load_simple_fit()
742 if (conf_noffset <= 0) { in spl_internal_load_simple_fit()
748 if (ret) { in spl_internal_load_simple_fit()
759 if (ret) { in spl_internal_load_simple_fit()
762 } else if (this_index < min_index) { in spl_internal_load_simple_fit()
773 * If required to start the other core before load "loadables" in spl_internal_load_simple_fit()
782 if (node < 0) in spl_internal_load_simple_fit()
787 if (ret) in spl_internal_load_simple_fit()
791 if (ret) in spl_internal_load_simple_fit()
794 if (image_info.entry_point == FDT_ERROR) in spl_internal_load_simple_fit()
800 if (ret) in spl_internal_load_simple_fit()
814 if (node < 0) in spl_internal_load_simple_fit()
818 if (node < 0) in spl_internal_load_simple_fit()
821 if (node < 0) { in spl_internal_load_simple_fit()
825 * If we pick the U-Boot image from "loadables", start at in spl_internal_load_simple_fit()
830 if (node < 0) { in spl_internal_load_simple_fit()
839 if (ret) in spl_internal_load_simple_fit()
844 * as a U-Boot image, if no OS-type has been declared. in spl_internal_load_simple_fit()
846 if (!spl_fit_image_get_os(fit, node, &spl_image->os)) in spl_internal_load_simple_fit()
848 #if !defined(CONFIG_SPL_OS_BOOT) in spl_internal_load_simple_fit()
854 if (spl_image->os == IH_OS_U_BOOT) { in spl_internal_load_simple_fit()
857 if (ret < 0) in spl_internal_load_simple_fit()
861 /* Now check if there are more images for us to load */ in spl_internal_load_simple_fit()
866 if (node < 0) in spl_internal_load_simple_fit()
869 if (!spl_fit_image_get_os(fit, node, &os_type)) in spl_internal_load_simple_fit()
873 if (spl_image->next_stage == SPL_NEXT_STAGE_KERNEL && in spl_internal_load_simple_fit()
879 if (ret < 0) in spl_internal_load_simple_fit()
882 if (os_type == IH_OS_U_BOOT) { in spl_internal_load_simple_fit()
883 #if CONFIG_IS_ENABLED(ATF) in spl_internal_load_simple_fit()
886 if (ih_arch == IH_ARCH_ARM) in spl_internal_load_simple_fit()
894 if (ret < 0) in spl_internal_load_simple_fit()
900 * If the "firmware" image did not provide an entry point, in spl_internal_load_simple_fit()
903 if (spl_image->entry_point == FDT_ERROR && in spl_internal_load_simple_fit()
908 if (spl_image->fdt_addr && spl_image->next_stage == SPL_NEXT_STAGE_UBOOT) in spl_internal_load_simple_fit()
912 #if CONFIG_IS_ENABLED(ATF) in spl_internal_load_simple_fit()
913 else if (os_type == IH_OS_OP_TEE) in spl_internal_load_simple_fit()
919 * If a platform does not provide CONFIG_SYS_UBOOT_START, U-Boot's in spl_internal_load_simple_fit()
923 if (spl_image->entry_point == FDT_ERROR || spl_image->entry_point == 0) in spl_internal_load_simple_fit()
942 if (i > 0) { in spl_load_simple_fit()
946 if (info->read(info, sector_offs, 1, fit) != 1) { in spl_load_simple_fit()
952 if (image_get_magic(fit) != FDT_MAGIC) { in spl_load_simple_fit()
959 if (!ret) { in spl_load_simple_fit()
967 /* If boot fail in spl, spl must decrease 1 and do_reset. */ in spl_load_simple_fit()
968 if (ret) in spl_load_simple_fit()
971 * If boot successfully, it is no need to do decrease in spl_load_simple_fit()
973 * If in thunderboot process, always need to decrease 1. in spl_load_simple_fit()
975 if (spl_image->next_stage == SPL_NEXT_STAGE_KERNEL) in spl_load_simple_fit()