Commit c01c71bc16d2836c3ff81af54529dab0686bca00

Authored by Simon Glass
Committed by Hans de Goede
1 parent e11c6c279d

arm: spl: Provide for a board-specific loader

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>

Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff

arch/arm/include/asm/spl.h
... ... @@ -26,9 +26,13 @@
26 26 BOOT_DEVICE_SPI,
27 27 BOOT_DEVICE_SATA,
28 28 BOOT_DEVICE_I2C,
  29 + BOOT_DEVICE_BOARD,
29 30 BOOT_DEVICE_NONE
30 31 };
31 32 #endif
  33 +
  34 +/* Board-specific load method */
  35 +void spl_board_load_image(void);
32 36  
33 37 /* Linker symbols. */
34 38 extern char __bss_start[], __bss_end[];
... ... @@ -229,6 +229,11 @@
229 229 spl_sata_load_image();
230 230 break;
231 231 #endif
  232 +#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
  233 + case BOOT_DEVICE_BOARD:
  234 + spl_board_load_image();
  235 + break;
  236 +#endif
232 237 default:
233 238 #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
234 239 puts("SPL: Unsupported Boot Device!\n");