]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: spl: Provide for a board-specific loader
authorSimon Glass <sjg@chromium.org>
Sat, 7 Feb 2015 17:47:29 +0000 (10:47 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:52:21 +0000 (13:52 +0200)
Some boards have a special way of loading U-Boot that does not fit with
the existing SPL code. For example sunxi uses an 'FEL' mode where U-Boot
is loaded over USB. Add a CONFIG option and boot mode for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/arm/include/asm/spl.h
common/spl/spl.c

index 8acd7cd1bd5ab539ccef5201607fcfe64aab08a7..17b6f544da79e024a6fb25e9c1405bac420663f4 100644 (file)
@@ -26,10 +26,14 @@ enum {
        BOOT_DEVICE_SPI,
        BOOT_DEVICE_SATA,
        BOOT_DEVICE_I2C,
+       BOOT_DEVICE_BOARD,
        BOOT_DEVICE_NONE
 };
 #endif
 
+/* Board-specific load method */
+void spl_board_load_image(void);
+
 /* Linker symbols. */
 extern char __bss_start[], __bss_end[];
 
index 526bd1a754490c5f93cdd9f0d6786c1b7828dbb2..c294cc0f4b2d824f67a28c99c80036cf040395cd 100644 (file)
@@ -229,6 +229,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        case BOOT_DEVICE_SATA:
                spl_sata_load_image();
                break;
+#endif
+#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
+       case BOOT_DEVICE_BOARD:
+               spl_board_load_image();
+               break;
 #endif
        default:
 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)