mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 23:21:58 +00:00
powerpc/85xx: Introduce CONFIG_SYS_EXTRA_ENV_RELOC
Some systems need to relocate the env_addr pointer early because the location it points to will get invalidated before env_relocate is called. One example is on systems that might use a L2 or L3 cache in SRAM mode and initialize that cache from SRAM mode back to being a cache in cpu_init_r. We set this on the 85xx boards that have support for NAND, SPI, or SDHC/MMC boot support as they use a secondary cache in SRAM mode and need the env_addr pointer relocated since we change from SRAM to normal cache mode in cpu_init_r. Also removed CONFIG_SYS_SPL as its not used anywhere. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
83b622aa88
commit
a55bb8340b
4 changed files with 19 additions and 5 deletions
|
@ -645,6 +645,17 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
|||
gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_EXTRA_ENV_RELOC
|
||||
/*
|
||||
* Some systems need to relocate the env_addr pointer early because the
|
||||
* location it points to will get invalidated before env_relocate is
|
||||
* called. One example is on systems that might use a L2 or L3 cache
|
||||
* in SRAM mode and initialize that cache from SRAM mode back to being
|
||||
* a cache in cpu_init_r.
|
||||
*/
|
||||
gd->env_addr += dest_addr - CONFIG_SYS_MONITOR_BASE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_MULTI
|
||||
serial_initialize();
|
||||
#endif
|
||||
|
|
|
@ -242,9 +242,10 @@
|
|||
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
|
||||
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
|
||||
|
||||
#if defined(CONFIG_SYS_SPL) || defined(CONFIG_RAMBOOT_NAND) \
|
||||
|| defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH)
|
||||
#if defined(CONFIG_RAMBOOT_NAND) || defined(CONFIG_RAMBOOT_SDCARD) || \
|
||||
defined(CONFIG_RAMBOOT_SPIFLASH)
|
||||
#define CONFIG_SYS_RAMBOOT
|
||||
#define CONFIG_SYS_EXTRA_ENV_RELOC
|
||||
#else
|
||||
#undef CONFIG_SYS_RAMBOOT
|
||||
#endif
|
||||
|
|
|
@ -203,8 +203,9 @@ extern unsigned long get_clock_freq(void);
|
|||
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
|
||||
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
|
||||
|
||||
#if defined(CONFIG_SYS_SPL) || defined(CONFIG_RAMBOOT_NAND)
|
||||
#if defined(CONFIG_RAMBOOT_NAND)
|
||||
#define CONFIG_SYS_RAMBOOT
|
||||
#define CONFIG_SYS_EXTRA_ENV_RELOC
|
||||
#else
|
||||
#undef CONFIG_SYS_RAMBOOT
|
||||
#endif
|
||||
|
|
|
@ -201,9 +201,10 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
|
|||
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
|
||||
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
|
||||
|
||||
#if defined(CONFIG_SYS_SPL) || defined(CONFIG_RAMBOOT_NAND) \
|
||||
|| defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH)
|
||||
#if defined(CONFIG_RAMBOOT_NAND) || defined(CONFIG_RAMBOOT_SDCARD) || \
|
||||
defined(CONFIG_RAMBOOT_SPIFLASH)
|
||||
#define CONFIG_SYS_RAMBOOT
|
||||
#define CONFIG_SYS_EXTRA_ENV_RELOC
|
||||
#else
|
||||
#undef CONFIG_SYS_RAMBOOT
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue