diff options
| author | Tom Rini <[email protected]> | 2022-07-06 18:54:29 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-07-06 18:54:29 -0400 |
| commit | cb9843bda3e500eb4add1927be4ed72077a69774 (patch) | |
| tree | 27b71ddf0129e0f65ede75b0a612e37cc8605086 /common | |
| parent | 4b7d0b24c7047c70d13db953b950a549accb8e14 (diff) | |
| parent | 847505a3eefdadf44b4a2cc9325c5dcf7aa1cfa2 (diff) | |
Merge branch '2022-07-06-platform-updates' into next
- Assorted updates for Toradex, TI, Aspeed and Nuvoton platforms
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/Kconfig | 1 | ||||
| -rw-r--r-- | common/spl/spl_spi.c | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 3fd56448006..4851834f9b6 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 diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index cf3f7ef4c0d..3eef2f8d683 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) { |
