Four different boards had different options for enabling cache that were virtually all the same. This consolidates these common functions into arch/arm/cpu/arm926ejs/cache.c This also has the positive side-effect of enabling cache on the Davinci (da850) boards. Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Add mach-at91 to the list of consolidations] Signed-off-by: Tom Rini <trini@konsulko.com>lime2-spi
parent
5f133bb7c5
commit
93b283d49f
@ -1,28 +0,0 @@ |
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2016 |
||||
* Heiko Schocher, DENX Software Engineering, hs@denx.de. |
||||
*/ |
||||
#include <linux/types.h> |
||||
#include <common.h> |
||||
|
||||
void enable_caches(void) |
||||
{ |
||||
#ifndef CONFIG_SYS_ICACHE_OFF |
||||
icache_enable(); |
||||
#endif |
||||
} |
||||
|
||||
#ifndef CONFIG_SYS_ICACHE_OFF |
||||
/* Invalidate entire I-cache and branch predictor array */ |
||||
void invalidate_icache_all(void) |
||||
{ |
||||
unsigned long i = 0; |
||||
|
||||
asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i)); |
||||
} |
||||
#else |
||||
void invalidate_icache_all(void) |
||||
{ |
||||
} |
||||
#endif |
Loading…
Reference in new issue