]> git.sur5r.net Git - u-boot/commitdiff
arm: cache: Add support for write-allocate D-Cache
authorMarek Vasut <marex@denx.de>
Mon, 15 Sep 2014 00:44:36 +0000 (02:44 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 6 Oct 2014 15:40:21 +0000 (17:40 +0200)
Add configuration for the write-allocate mode of L1 D-Cache on ARM.
This is needed for D-Cache operation on Cortex-A9 on the SoCFPGA .

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>
arch/arm/include/asm/system.h
arch/arm/lib/cache-cp15.c

index d51ba668f32373f0be80f68bbdc4207048e10082..ca2d44faf4e935e7f80f7acff6adb5e96192d5cf 100644 (file)
@@ -185,6 +185,7 @@ enum dcache_option {
        DCACHE_OFF = 0x12,
        DCACHE_WRITETHROUGH = 0x1a,
        DCACHE_WRITEBACK = 0x1e,
+       DCACHE_WRITEALLOC = 0x16,
 };
 
 /* Size of an MMU section */
index 3e62d58542359c2f91e157a0954f9362a33b2817..2155fe818717163caaa59428dbd842e0ffd926db 100644 (file)
@@ -73,6 +73,8 @@ __weak void dram_bank_mmu_setup(int bank)
             i++) {
 #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
                set_section_dcache(i, DCACHE_WRITETHROUGH);
+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC)
+               set_section_dcache(i, DCACHE_WRITEALLOC);
 #else
                set_section_dcache(i, DCACHE_WRITEBACK);
 #endif