summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-01-14 14:31:38 +0100
committerStefan Roese <sr@denx.de>2022-01-20 11:35:29 +0100
commit2e0429bcc1a9cf2c3b4cc0e8af7199f031a3b8e9 (patch)
treeacf9804cf808bcacfec4984a8fbf63898fae28fe /include/spl.h
parent66f874855cc6e750e979a9e08bb96d0da38d534f (diff)
SPL: Add struct spl_boot_device parameter into spl_parse_board_header()
Add parameter spl_boot_device to spl_parse_board_header(), which allows the implementations to see from which device we are booting and do boot-device-specific checks of the image header. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index 0af0ee3003..469e7fe1cc 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -29,6 +29,7 @@ struct image_header;
struct blk_desc;
struct image_header;
+struct spl_boot_device;
/*
* u_boot_first_phase() - check if this is the first U-Boot phase
@@ -340,6 +341,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
* Returns 0 on success.
*/
int spl_load_legacy_img(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
struct spl_load_info *load, ulong header);
/**
@@ -438,6 +440,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image);
* @return 0 if a header was correctly parsed, -ve on error
*/
int spl_parse_image_header(struct spl_image_info *spl_image,
+ const struct spl_boot_device *bootdev,
const struct image_header *header);
void spl_board_prepare_for_linux(void);
@@ -574,18 +577,22 @@ static inline const char *spl_loader_name(const struct spl_image_loader *loader)
/* SPL FAT image functions */
int spl_load_image_fat(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
struct blk_desc *block_dev, int partition,
const char *filename);
int spl_load_image_fat_os(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
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(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
struct blk_desc *block_dev, int partition,
const char *filename);
int spl_load_image_ext_os(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev,
struct blk_desc *block_dev, int partition);
/**