aboutsummaryrefslogtreecommitdiff
path: root/src/arch/armv7/bootblock_simple.c
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-03-19 17:11:31 -0700
committerDavid Hendricks <dhendrix@chromium.org>2013-03-21 05:11:59 +0100
commit8ec69053f1a9f107f73f018fd613cf3038a12c7c (patch)
tree6a613debdc996358e23aeee8e2a4888ad9ba8bf1 /src/arch/armv7/bootblock_simple.c
parenteb06a4259b48128faed94b4ca3f8c64d3cd5a4c3 (diff)
armv7: move armv7_invalidate_caches() to cache.c
This just moves cache maintenance stuff from the armv7 bootblock code to cache.c Change-Id: I0b3ab58a1d8a3fe3d9568e02e156a36b6f33ca0b Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/2867 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/armv7/bootblock_simple.c')
-rw-r--r--src/arch/armv7/bootblock_simple.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/arch/armv7/bootblock_simple.c b/src/arch/armv7/bootblock_simple.c
index 7012e17807..ad25b41316 100644
--- a/src/arch/armv7/bootblock_simple.c
+++ b/src/arch/armv7/bootblock_simple.c
@@ -28,58 +28,6 @@
#include "stages.c"
-static void armv7_invalidate_caches(void)
-{
- uint32_t clidr;
- int level;
-
- /* Invalidate branch predictor */
- bpiall();
-
- /* Iterate thru each cache identified in CLIDR and invalidate */
- clidr = read_clidr();
- for (level = 0; level < 7; level++) {
- unsigned int ctype = (clidr >> (level * 3)) & 0x7;
- uint32_t csselr;
-
- switch(ctype) {
- case 0x0:
- /* no cache */
- break;
- case 0x1:
- /* icache only */
- csselr = (level << 1) | 1;
- write_csselr(csselr);
- icache_invalidate_all();
- break;
- case 0x2:
- case 0x4:
- /* dcache only or unified cache */
- dcache_invalidate_all();
- break;
- case 0x3:
- /* separate icache and dcache */
- csselr = (level << 1) | 1;
- write_csselr(csselr);
- icache_invalidate_all();
-
- csselr = level < 1;
- write_csselr(csselr);
- dcache_invalidate_all();
- break;
- default:
- /* reserved */
- break;
- }
- }
-
- /* Invalidate TLB */
- /* FIXME: ARMv7 Architecture Ref. Manual claims that the distinction
- * instruction vs. data TLBs is deprecated in ARMv7. But that doesn't
- * really seem true for Cortex-A15? */
- tlb_invalidate_all();
-}
-
static int boot_cpu(void)
{
/*