arm: at91: Makefile: Compile lowlevel_init only when really necessary
[oweals/u-boot.git] / include / spl.h
index a56032ae3ebd2bef749f49349482e6c4c761afe5..f09909e189ba9314d321e79d807f9a66c92ce5c1 100644 (file)
@@ -11,6 +11,7 @@
 /* Platform-specific defines */
 #include <linux/compiler.h>
 #include <asm/spl.h>
+#include <handoff.h>
 
 /* Value in r0 indicates we booted from U-Boot */
 #define UBOOT_NOT_LOADED_FROM_SPL      0x13578642
@@ -48,6 +49,19 @@ static inline bool u_boot_first_phase(void)
        return false;
 }
 
+/* A string name for SPL or TPL */
+#ifdef CONFIG_SPL_BUILD
+# ifdef CONFIG_TPL_BUILD
+#  define SPL_TPL_NAME "TPL"
+# else
+#  define SPL_TPL_NAME "SPL"
+# endif
+# define SPL_TPL_PROMPT        SPL_TPL_NAME ": "
+#else
+# define SPL_TPL_NAME  ""
+# define SPL_TPL_PROMPT        ""
+#endif
+
 struct spl_image_info {
        const char *name;
        u8 os;
@@ -60,6 +74,11 @@ struct spl_image_info {
        u32 size;
        u32 flags;
        void *arg;
+#ifdef CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK
+       ulong dcrc_data;
+       ulong dcrc_length;
+       ulong dcrc;
+#endif
 };
 
 /*
@@ -104,6 +123,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
                        struct spl_load_info *info, ulong sector, void *fdt);
 
 #define SPL_COPY_PAYLOAD_ONLY  1
+#define SPL_FIT_FOUND          2
 
 /* SPL common functions */
 void preloader_console_init(void);
@@ -338,6 +358,18 @@ void spl_optee_entry(void *arg0, void *arg1, void *arg2, void *arg3);
  */
 void board_return_to_bootrom(void);
 
+/**
+ * board_spl_fit_post_load - allow process images after loading finished
+ *
+ */
+void board_spl_fit_post_load(ulong load_addr, size_t length);
+
+/**
+ * board_spl_fit_size_align - specific size align before processing payload
+ *
+ */
+ulong board_spl_fit_size_align(ulong size);
+
 /**
  * spl_perform_fixups() - arch/board-specific callback before processing
  *                        the boot-payload