mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-22 23:21:31 +00:00
arm: socfpga: Move cache_enable to CPU code
Move icache_enable() and dcache_enable() function calls from board code into the CPU code and into the enable_caches() function. This is how the cache enabling code was designed to work. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@altera.com> Cc: Pavel Machek <pavel@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Pavel Machek <pavel@denx.de>
This commit is contained in:
parent
97ce274d97
commit
4ab333b765
2 changed files with 10 additions and 3 deletions
|
@ -33,6 +33,16 @@ int dram_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void enable_caches(void)
|
||||||
|
{
|
||||||
|
#ifndef CONFIG_SYS_ICACHE_OFF
|
||||||
|
icache_enable();
|
||||||
|
#endif
|
||||||
|
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||||
|
dcache_enable();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DesignWare Ethernet initialization
|
* DesignWare Ethernet initialization
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,9 +34,6 @@ int board_early_init_f(void)
|
||||||
*/
|
*/
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
icache_enable();
|
|
||||||
dcache_enable();
|
|
||||||
|
|
||||||
/* Address of boot parameters for ATAG (if ATAG is used) */
|
/* Address of boot parameters for ATAG (if ATAG is used) */
|
||||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue