summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPali Rohár <[email protected]>2022-01-14 14:31:38 +0100
committerStefan Roese <[email protected]>2022-01-20 11:35:29 +0100
commit2e0429bcc1a9cf2c3b4cc0e8af7199f031a3b8e9 (patch)
treeacf9804cf808bcacfec4984a8fbf63898fae28fe /arch
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 <[email protected]> Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mvebu/spl.c1
-rw-r--r--arch/arm/mach-sunxi/spl_spi_sunxi.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 47b64c14631..fe22951e16c 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -100,6 +100,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
#endif
int spl_parse_board_header(struct spl_image_info *spl_image,
+ const struct spl_boot_device *bootdev,
const void *image_header, size_t size)
{
const struct kwbimage_main_hdr_v1 *mhdr = image_header;
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index 3499c4cc5f8..910e8050161 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -348,7 +348,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
ret = spl_load_simple_fit(spl_image, &load,
load_offset, header);
} else {
- ret = spl_parse_image_header(spl_image, header);
+ ret = spl_parse_image_header(spl_image, bootdev, header);
if (ret)
return ret;