summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2016-11-28 00:15:16 +0200
committerTom Rini <trini@konsulko.com>2016-12-02 21:32:41 -0500
commitc230a378381475acbaeed6f16a45e44c6c92e2c1 (patch)
treed120e5ba37d0b75532a7b715d2a3778657cbe9d0
parentdad2b3005e8f9f20ecc723544ceb042943047818 (diff)
downloadu-boot-imx-c230a378381475acbaeed6f16a45e44c6c92e2c1.zip
u-boot-imx-c230a378381475acbaeed6f16a45e44c6c92e2c1.tar.gz
u-boot-imx-c230a378381475acbaeed6f16a45e44c6c92e2c1.tar.bz2
sh: cache use jump_to_P2() and back_to_P1() from asm/system.h
Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine them. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/sh/cpu/sh4/cache.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index b3e5fd5..50695b6 100644
--- a/arch/sh/cpu/sh4/cache.c
+++ b/arch/sh/cpu/sh4/cache.c
@@ -7,44 +7,9 @@
#include <common.h>
#include <command.h>
-#include <asm/processor.h>
#include <asm/io.h>
-
-/*
- * Jump to P2 area.
- * When handling TLB or caches, we need to do it from P2 area.
- */
-#define jump_to_P2() \
- do { \
- unsigned long __dummy; \
- __asm__ __volatile__( \
- "mov.l 1f, %0\n\t" \
- "or %1, %0\n\t" \
- "jmp @%0\n\t" \
- " nop\n\t" \
- ".balign 4\n" \
- "1: .long 2f\n" \
- "2:" \
- : "=&r" (__dummy) \
- : "r" (0x20000000)); \
- } while (0)
-
-/*
- * Back to P1 area.
- */
-#define back_to_P1() \
- do { \
- unsigned long __dummy; \
- __asm__ __volatile__( \
- "nop;nop;nop;nop;nop;nop;nop\n\t" \
- "mov.l 1f, %0\n\t" \
- "jmp @%0\n\t" \
- " nop\n\t" \
- ".balign 4\n" \
- "1: .long 2f\n" \
- "2:" \
- : "=&r" (__dummy)); \
- } while (0)
+#include <asm/processor.h>
+#include <asm/system.h>
#define CACHE_VALID 1
#define CACHE_UPDATED 2