global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace
[platform/kernel/u-boot.git] / arch / arm / lib / spl.c
index 8e2bdf3..b138974 100644 (file)
@@ -50,7 +50,7 @@ void __weak board_init_f(ulong dummy)
  * This function jumps to an image with argument. Normally an FDT or ATAGS
  * image.
  */
-#ifdef CONFIG_SPL_OS_BOOT
+#if CONFIG_IS_ENABLED(OS_BOOT)
 #ifdef CONFIG_ARM64
 void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
 {
@@ -77,3 +77,14 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
 }
 #endif /* CONFIG_ARM64 */
 #endif
+
+#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
+void __noreturn jump_to_image_optee(struct spl_image_info *spl_image)
+{
+       /* flush and turn off caches before jumping to OPTEE */
+       cleanup_before_linux();
+
+       spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
+                       (void *)spl_image->entry_point);
+}
+#endif