]> git.sur5r.net Git - u-boot/blobdiff - include/spl.h
spl: Introduce new function spl_board_prepare_for_boot
[u-boot] / include / spl.h
index 92cdc049d45382f11fe5cd1539f57c8f7e445bf3..335b76a1b15392c0829af6313d13a21afdbaad84 100644 (file)
@@ -29,6 +29,24 @@ struct spl_image_info {
        u32 flags;
 };
 
+/*
+ * Information required to load data from a device
+ *
+ * @dev: Pointer to the device, e.g. struct mmc *
+ * @priv: Private data for the device
+ * @bl_len: Block length for reading in bytes
+ * @read: Function to call to read from the device
+ */
+struct spl_load_info {
+       void *dev;
+       void *priv;
+       int bl_len;
+       ulong (*read)(struct spl_load_info *load, ulong sector, ulong count,
+                     void *buf);
+};
+
+int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fdt);
+
 #define SPL_COPY_PAYLOAD_ONLY  1
 
 extern struct spl_image_info spl_image;
@@ -38,8 +56,9 @@ void preloader_console_init(void);
 u32 spl_boot_device(void);
 u32 spl_boot_mode(void);
 void spl_set_header_raw_uboot(void);
-void spl_parse_image_header(const struct image_header *header);
+int spl_parse_image_header(const struct image_header *header);
 void spl_board_prepare_for_linux(void);
+void spl_board_prepare_for_boot(void);
 void __noreturn jump_to_image_linux(void *arg);
 int spl_start_uboot(void);
 void spl_display_print(void);
@@ -72,14 +91,16 @@ int spl_usb_load_image(void);
 int spl_sata_load_image(void);
 
 /* SPL FAT image functions */
-int spl_load_image_fat(block_dev_desc_t *block_dev, int partition, const char *filename);
-int spl_load_image_fat_os(block_dev_desc_t *block_dev, int partition);
+int spl_load_image_fat(struct blk_desc *block_dev, int partition,
+                      const char *filename);
+int spl_load_image_fat_os(struct blk_desc *block_dev, int partition);
 
 void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image);
 
 /* SPL EXT image functions */
-int spl_load_image_ext(block_dev_desc_t *block_dev, int partition, const char *filename);
-int spl_load_image_ext_os(block_dev_desc_t *block_dev, int partition);
+int spl_load_image_ext(struct blk_desc *block_dev, int partition,
+                      const char *filename);
+int spl_load_image_ext_os(struct blk_desc *block_dev, int partition);
 
 /**
  * spl_init() - Set up device tree and driver model in SPL if enabled