Patchwork [U-Boot,02/10] x86: Add basic cache operations

login
register
mail settings
Submitter Simon Glass
Date Dec. 14, 2012, 9:13 p.m.
Message ID <1355519594-5694-2-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/206562/
State Superseded, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - Dec. 14, 2012, 9:13 p.m.
At present most x86 cache operations are undefined. Add a basic
implementation for these.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/x86/cpu/cpu.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 315e87a..fe6e568 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -226,3 +226,26 @@  void flush_dcache_range(unsigned long start, unsigned long stop)
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
 }
+
+void dcache_enable(void)
+{
+	enable_caches();
+}
+
+void dcache_disable(void)
+{
+	disable_caches();
+}
+
+void icache_enable(void)
+{
+}
+
+void icache_disable(void)
+{
+}
+
+int icache_status(void)
+{
+	return 1;
+}