Commit 40e7bcdee72830fa51d9e98428f1a61f9126527e

Authored by Marek Vasut
1 parent 9ca2116ce4

arm: socfpga: cache: Enable D-Cache

The code is now fixed to the point where we can safely enable
the L1 data cache. Enable the D-Cache and set it as write-alloc.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>

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

board/altera/socfpga/socfpga_cyclone5.c
... ... @@ -35,6 +35,7 @@
35 35 int board_init(void)
36 36 {
37 37 icache_enable();
  38 + dcache_enable();
38 39  
39 40 /* Address of boot parameters for ATAG (if ATAG is used) */
40 41 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
include/configs/socfpga_cyclone5.h
... ... @@ -18,7 +18,6 @@
18 18 #undef CONFIG_SOCFPGA_VIRTUAL_TARGET
19 19  
20 20 #define CONFIG_ARMV7
21   -#define CONFIG_SYS_DCACHE_OFF
22 21 #undef CONFIG_USE_IRQ
23 22  
24 23 #define CONFIG_MISC_INIT_R
... ... @@ -26,6 +25,7 @@
26 25 #define CONFIG_SOCFPGA
27 26 #define CONFIG_CLOCKS
28 27  
  28 +#define CONFIG_SYS_ARM_CACHE_WRITEALLOC
29 29 #define CONFIG_SYS_CACHELINE_SIZE 32
30 30  
31 31 /* base address for .text section */