public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/26 v2][NEXT] ARM (ARM926ejs): add data cache support, tested on magnesium and tx25 board
Date: Fri, 17 Sep 2010 13:10:30 +0200	[thread overview]
Message-ID: <1284721853-8298-4-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1284721853-8298-3-git-send-email-hs@denx.de>

Enable "cache" command on tx25 and magnesium 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
    --------------------------------------------------
    magnesium           32,6s   22,5s   30s     = x 1,09
    tx25 (29MB only)    9,69s   5,05s   8,16s   = x 1,19

    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
    --------------------------------------------------
    magnesium           4,25s   2,08s   1,72s   = x 2,47
    tx25                4,82s   2,04s   1,84s   = x 2,62

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

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Alessandro Rubini <rubini@gnudd.com>
---
 arch/arm/lib/cache.c               |    6 ++++++
 include/configs/imx27lite-common.h |    1 +
 include/configs/tx25.h             |    1 +
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 61ee9d3..b36fd24 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -32,5 +32,11 @@ void  flush_cache (unsigned long dummy1, unsigned long dummy2)
 
 	arm1136_cache_flush();
 #endif
+#ifdef CONFIG_ARM926EJS
+	/* test and clean, page 2-23 of arm926ejs manual */
+	asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
+	/* disable write buffer as well (page 2-22) */
+	asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
+#endif
 	return;
 }
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 1da8602..33550ba 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -188,6 +188,7 @@
  */
 #include <config_cmd_default.h>
 #define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_FAT
diff --git a/include/configs/tx25.h b/include/configs/tx25.h
index c8188ca..013aa35 100644
--- a/include/configs/tx25.h
+++ b/include/configs/tx25.h
@@ -131,6 +131,7 @@
 /* U-Boot commands */
 #include <config_cmd_default.h>
 #define CONFIG_CMD_NAND
+#define CONFIG_CMD_CACHE
 
 /*
  * Ethernet
-- 
1.6.2.5

  reply	other threads:[~2010-09-17 11:10 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 18:15 [U-Boot] [PATCH 00/26] arm: add full relocation / cache support Heiko Schocher
2010-08-11 20:00 ` Ben Gardiner
2010-08-11 20:36   ` Ben Gardiner
2010-08-11 20:01 ` Wolfgang Denk
2010-08-12  5:34   ` Heiko Schocher
2010-08-12 20:49   ` Magnus Lilja
2010-08-13 10:01     ` Wolfgang Denk
2010-08-12 12:50 ` Shinya Kuribayashi
2010-08-12 12:55   ` Shinya Kuribayashi
2010-08-12 20:19     ` Wolfgang Denk
2010-08-12 20:17   ` Wolfgang Denk
2010-08-13 14:36     ` Shinya Kuribayashi
2010-09-17 11:10 ` [U-Boot] [PATCH 00/26 v2][NEXT] " Heiko Schocher
2010-09-17 11:10   ` [U-Boot] [PATCH 01/26 v2][NEXT] arm: get rid of bi_env Heiko Schocher
2010-09-17 11:10     ` [U-Boot] [PATCH 02/26 v2][NEXT] ARM: cp15: setup mmu and enable dcache Heiko Schocher
2010-09-17 11:10       ` Heiko Schocher [this message]
2010-09-17 11:10         ` [U-Boot] [PATCH 04/26 v2][NEXT] ARM V7 (OMAP): add data cache support, test on Beagle board Heiko Schocher
2010-09-17 11:10           ` [U-Boot] [PATCH 05/26 v2][NEXT] ARM (ARM11): add data cache support, test on Qong board Heiko Schocher
2010-09-17 11:10             ` [U-Boot] [PATCH 06/26 v2][NEXT] relocation: fixup cmdtable Heiko Schocher
2010-09-17 11:10               ` [U-Boot] [PATCH 07/26 v2][NEXT] common: move TOTAL_MALLOC_LEN to include/common.h Heiko Schocher
2010-09-17 11:10                 ` [U-Boot] [PATCH 08/26 v2][NEXT] i2c: fix command usage help Heiko Schocher
2010-09-17 11:10                   ` [U-Boot] [PATCH 09/26 v2][NEXT] disk/part.c: fix relocation fixup Heiko Schocher
2010-09-17 11:10                     ` [U-Boot] [PATCH 10/26 v2][NEXT] i2c, omap24xx: set bus_initialized only after relocation Heiko Schocher
2010-09-17 11:10                       ` [U-Boot] [PATCH 11/26 v2][NEXT] nand_boot_fsl_nfc.c: make "nfc" a "static const" pointer Heiko Schocher
2010-09-17 11:10                         ` [U-Boot] [PATCH 12/26 v2][NEXT] ARM: add relocation support Heiko Schocher
2010-09-17 11:10                           ` [U-Boot] [PATCH 13/26 v2][NEXT] ARM: implement relocation for ARM11 Heiko Schocher
2010-09-17 11:10                             ` [U-Boot] [PATCH 14/26 v2][NEXT] ARM: implement relocation for ARM V7 (OMAP) Heiko Schocher
2010-09-17 11:10                               ` [U-Boot] [PATCH 15/26 v2][NEXT] ARM: implement relocation for ARM926 Heiko Schocher
2010-09-17 11:10                                 ` [U-Boot] [PATCH 16/26 v2][NEXT] ARM: implement relocation for ARM920 Heiko Schocher
2010-09-17 11:10                                   ` [U-Boot] [PATCH 17/26 v2][NEXT] ARM: implement relocation for ARM925 Heiko Schocher
2010-09-17 11:10                                     ` [U-Boot] [PATCH 18/26 v2][NEXT] ARM: implement relocation for ARM946 Heiko Schocher
2010-09-17 11:10                                       ` [U-Boot] [PATCH 19/26 v2][NEXT] ARM: implement relocation for pxa Heiko Schocher
2010-09-17 11:10                                         ` [U-Boot] [PATCH 20/26 v2][NEXT] ARM: implement relocation for ixp Heiko Schocher
2010-09-17 11:10                                           ` [U-Boot] [PATCH 21/26 v2][NEXT] ARM: implement relocation for sa1100 Heiko Schocher
2010-09-17 11:10                                             ` [U-Boot] [PATCH 22/26 v2][NEXT] ARM: implement relocation for s3c44b0 Heiko Schocher
2010-09-17 11:10                                               ` [U-Boot] [PATCH 23/26 v2][NEXT] ARM: implement relocation for lh7a40x Heiko Schocher
2010-09-17 11:10                                                 ` [U-Boot] [PATCH 24/26 v2][NEXT] ARM: implement relocation for arm_intcm Heiko Schocher
2010-09-17 11:10                                                   ` [U-Boot] [PATCH 25/26 v2][NEXT] ARM: implement relocation for arm720t Heiko Schocher
2010-09-17 11:10                                                     ` [U-Boot] [PATCH 26/26 v2][NEXT] ARM: implement relocation for arm1176 Heiko Schocher
2010-09-22  9:32                                 ` [U-Boot] [PATCH 15/26 v2][NEXT] ARM: implement relocation for ARM926 Albert ARIBAUD
2010-09-17 21:40                               ` [U-Boot] [PATCH 14/26 v2][NEXT] ARM: implement relocation for ARM V7 (OMAP) John Rigby
2010-09-17 22:02                                 ` Wolfgang Denk
2010-09-19  1:21                                   ` John Rigby
2010-09-19  6:07                                     ` Heiko Schocher
2010-09-19  6:59                                       ` Wolfgang Denk
2010-09-19  6:58                                     ` Wolfgang Denk
2010-09-17 13:07                           ` [U-Boot] [PATCH 12/26 v2][NEXT] ARM: add relocation support Albert ARIBAUD
2010-09-17 14:54                             ` Wolfgang Denk
2010-09-17 16:44                               ` Albert ARIBAUD
2010-09-17 19:22                                 ` Wolfgang Denk
2010-09-17 22:58                                   ` Albert ARIBAUD
2010-09-18 22:35                           ` Albert ARIBAUD
2010-09-18 22:58                             ` Wolfgang Denk
2010-09-19  6:04                               ` Heiko Schocher
2010-09-19  7:17                                 ` Albert ARIBAUD
2010-09-19  8:28                           ` Albert ARIBAUD
2010-09-19 11:17                           ` Wolfgang Denk
2010-09-19 11:56                             ` Heiko Schocher
2010-09-18 23:19   ` [U-Boot] [PATCH 00/26 v2][NEXT] arm: add full relocation / cache support Wolfgang Denk
2010-09-22 17:51   ` Ben Gardiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284721853-8298-4-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox