aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/Kconfig20
-rw-r--r--common/spl/spl_spi.c16
2 files changed, 33 insertions, 3 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 152569ee43..931619c366 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -82,6 +82,7 @@ config SPL_MAX_SIZE
default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x20000 && !MACH_SUN50I_H616
default 0x7000 if RCAR_GEN3
default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0
+ default 0x10000 if ASPEED_AST2600
default 0x0
help
Maximum size of the SPL image (text, data, rodata, and linker lists
@@ -234,6 +235,18 @@ config SPL_HANDOFF
config SPL_LDSCRIPT
string "Linker script for the SPL stage"
+ default "arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds" if MACH_SUNIV
+ default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if ARCH_SUNXI && !MACH_SUNIV && !ARM64
+ default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
+ default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
+ default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A
+ default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
+ default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if ARCH_AT91 && CPU_ARM926EJS
+ default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if ARCH_AT91 && CPU_V7A
+ default "arch/arm/mach-omap2/u-boot-spl.lds" if ARCH_MX6 || ARCH_OMAP2PLUS || (ARCH_K3 && !ARM64)
+ default "arch/arm/mach-zynq/u-boot-spl.lds" if ARCH_ZYNQ
+ default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4
+ default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds" if ARCH_DAVINCI
default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
help
The SPL stage will usually require a different linker-script
@@ -1318,6 +1331,13 @@ config SPL_USB_STORAGE
config options. This enables loading from USB using a configured
device.
+config SYS_USB_FAT_BOOT_PARTITION
+ int "Partition on USB to use to load U-Boot from"
+ depends on SPL_USB_STORAGE
+ default 1
+ help
+ Partition on the USB storage device to load U-Boot from
+
config SPL_USB_GADGET
bool "Suppport USB Gadget drivers"
help
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index cf3f7ef4c0..3eef2f8d68 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -71,6 +71,16 @@ unsigned int __weak spl_spi_get_uboot_offs(struct spi_flash *flash)
return CONFIG_SYS_SPI_U_BOOT_OFFS;
}
+u32 __weak spl_spi_boot_bus(void)
+{
+ return CONFIG_SF_DEFAULT_BUS;
+}
+
+u32 __weak spl_spi_boot_cs(void)
+{
+ return CONFIG_SF_DEFAULT_CS;
+}
+
/*
* The main entry for SPI booting. It's necessary that SDRAM is already
* configured and available since this code loads the main U-Boot image
@@ -83,15 +93,15 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
unsigned int payload_offs;
struct spi_flash *flash;
struct image_header *header;
+ unsigned int sf_bus = spl_spi_boot_bus();
+ unsigned int sf_cs = spl_spi_boot_cs();
/*
* Load U-Boot image from SPI flash into RAM
* In DM mode: defaults speed and mode will be
* taken from DT when available
*/
-
- flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
- CONFIG_SF_DEFAULT_CS,
+ flash = spi_flash_probe(sf_bus, sf_cs,
CONFIG_SF_DEFAULT_SPEED,
CONFIG_SF_DEFAULT_MODE);
if (!flash) {