]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM (ARM11): add data cache support, test on Qong board
authorHeiko Schocher <hs@denx.de>
Fri, 17 Sep 2010 11:10:32 +0000 (13:10 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 19 Sep 2010 17:29:51 +0000 (19:29 +0200)
Add data cache support for arm1136 systems.

Enable "cache" command on Qong board and test performance.

    Test 1: Loading 127 MB of data from NAND flash into RAM:

    Instr. Cache off on on
      Data Cache off off on
    --------------------------------------------------
    QONG (ARM11) 177s 95s 43s = x 4.1

    Test 2: uncompressing a gzipped image from RAM to RAM
            (size compressed: 6.5 MiB, uncompressed: 35 MiB):

    Instr. Cache off on on
      Data Cache off off on
    --------------------------------------------------
    QONG (ARM11) 1.54s 0.95s 0.18s = x 8.6

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
arch/arm/cpu/arm1136/start.S
arch/arm/lib/cache.c
include/configs/qong.h

index 41eb82dae246b9509545f051daac605a02b7db05..1c58abdcd05dcc4ba0426180fd88f7e16d0962ad 100644 (file)
@@ -439,6 +439,11 @@ fiq:
        .align 5
 .global arm1136_cache_flush
 arm1136_cache_flush:
+#if !defined(CONFIG_SYS_NO_ICACHE)
                mcr     p15, 0, r1, c7, c5, 0   @ invalidate I cache
+#endif
+#if !defined(CONFIG_SYS_NO_DCACHE)
+               mcr     p15, 0, r1, c7, c14, 0  @ invalidate D cache
+#endif
                mov     pc, lr                  @ back to caller
 #endif /* CONFIG_PRELOADER */
index 3684cad16aaf0bbf8042d57d5651dc90768ebfe5..55b633ee0013c9a7a4220057eb8c93d7075e01c6 100644 (file)
@@ -27,7 +27,7 @@
 
 void  flush_cache (unsigned long dummy1, unsigned long dummy2)
 {
-#ifdef CONFIG_OMAP2420
+#if defined(CONFIG_OMAP2420) || defined(CONFIG_ARM1136)
        void arm1136_cache_flush(void);
 
        arm1136_cache_flush();
index 100fa3f8aca4d781a421efb1005cd32d7f6ccc11..4735b5eb8824e5fb38848e247c2547e7ceff1025 100644 (file)
 
 #include <config_cmd_default.h>
 
+#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_NET