diff options
author | Simon Glass <sjg@chromium.org> | 2016-09-24 18:20:14 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 15:08:53 -0400 |
commit | b4a6c2aae6165782dd9fa4944b38c2c2a7419af1 (patch) | |
tree | ca27b960cc3ba435180412905f4d1e6c3d16f4b4 /drivers/mtd | |
parent | 2a2ee2ac35f26f6b4dae11a225c2803291dff10e (diff) | |
download | u-boot-imx-b4a6c2aae6165782dd9fa4944b38c2c2a7419af1.zip u-boot-imx-b4a6c2aae6165782dd9fa4944b38c2c2a7419af1.tar.gz u-boot-imx-b4a6c2aae6165782dd9fa4944b38c2c2a7419af1.tar.bz2 |
spl: Update ext functions to take an spl_image parameter
Update the ext loader to avoid using the spl_image global variable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi/sunxi_spi_spl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c index 70d6d15..67c7edd 100644 --- a/drivers/mtd/spi/sunxi_spi_spl.c +++ b/drivers/mtd/spi/sunxi_spi_spl.c @@ -262,7 +262,8 @@ static void spi0_read_data(void *buf, u32 addr, u32 len) /*****************************************************************************/ -static int spl_spi_load_image(struct spl_boot_device *bootdev) +static int spl_spi_load_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { int err; struct image_header *header; @@ -271,12 +272,12 @@ static int spl_spi_load_image(struct spl_boot_device *bootdev) spi0_init(); spi0_read_data((void *)header, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40); - err = spl_parse_image_header(&spl_image, header); + err = spl_parse_image_header(spl_image, header); if (err) return err; - spi0_read_data((void *)spl_image.load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS, - spl_image.size); + spi0_read_data((void *)spl_image->load_addr, CONFIG_SYS_SPI_U_BOOT_OFFS, + spl_image->size); spi0_deinit(); return 0; |