diff options
Diffstat (limited to 'include/spl.h')
-rw-r--r-- | include/spl.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/spl.h b/include/spl.h index 92cdc04..de4f70a 100644 --- a/include/spl.h +++ b/include/spl.h @@ -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; @@ -72,14 +90,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 |