summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c4
-rw-r--r--common/spl/spl_spi.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 9890a889abd..ac19e5ffcd1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -384,10 +384,6 @@ static int spl_load_image(u32 boot_device)
return loader->load_image(&bootdev);
switch (boot_device) {
-#if defined(CONFIG_SPL_SPI_SUPPORT) || defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
- case BOOT_DEVICE_SPI:
- return spl_spi_load_image(&bootdev);
-#endif
#ifdef CONFIG_SPL_ETH_SUPPORT
case BOOT_DEVICE_CPGMAC:
#ifdef CONFIG_SPL_ETH_DEVICE
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index e4cc0d08229..b9294f201ee 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -65,7 +65,7 @@ static ulong spl_spi_fit_read(struct spl_load_info *load, ulong sector,
* configured and available since this code loads the main U-Boot image
* from SPI into SDRAM and starts it from there.
*/
-int spl_spi_load_image(struct spl_boot_device *bootdev)
+static int spl_spi_load_image(struct spl_boot_device *bootdev)
{
int err = 0;
struct spi_flash *flash;
@@ -121,3 +121,5 @@ int spl_spi_load_image(struct spl_boot_device *bootdev)
return err;
}
+/* Use priorty 1 so that boards can override this */
+SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_SPI, spl_spi_load_image);