ARM: 6826/1: Merge v6 and v7 DEBUG_LL DCC support
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 23 Mar 2011 21:46:15 +0000 (22:46 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Mar 2011 18:01:43 +0000 (19:01 +0100)
The inline assembly differences for v6 vs. v7 are purely
optimizations. On a v7 processor, an mrc with the pc sets the
condition codes to the 28-31 bits of the register being read. It
just so happens that the TX/RX full bits the DCC support code is
testing for are high enough in the register to be put into the
condition codes. On a v6 processor, this "feature" isn't
implemented and thus we have to do the usual read, mask, test
operations to check for TX/RX full. Thus, we can drop the v7
implementation and just use the v6 implementation for both.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/misc.c
arch/arm/kernel/debug.S

index 84ac4d656310772f424b42996c72bb48ba0673d5..adf583cd0c351196cbfb4efe450b845707c7e36c 100644 (file)
 
 #if defined(CONFIG_DEBUG_ICEDCC)
 
-#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
                .macro  loadsp, rb, tmp
                .endm
                .macro  writeb, ch, rb
                mcr     p14, 0, \ch, c0, c5, 0
                .endm
-#elif defined(CONFIG_CPU_V7)
-               .macro  loadsp, rb, tmp
-               .endm
-               .macro  writeb, ch, rb
-wait:          mrc     p14, 0, pc, c0, c1, 0
-               bcs     wait
-               mcr     p14, 0, \ch, c0, c5, 0
-               .endm
 #elif defined(CONFIG_CPU_XSCALE)
                .macro  loadsp, rb, tmp
                .endm
index 4657e877bf8f49fc192f5201d078b47694a28e29..2df38263124c2676e0b0ec62a95de05a1e2ad891 100644 (file)
@@ -36,7 +36,7 @@ extern void error(char *x);
 
 #ifdef CONFIG_DEBUG_ICEDCC
 
-#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
 
 static void icedcc_putc(int ch)
 {
@@ -52,16 +52,6 @@ static void icedcc_putc(int ch)
        asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
 }
 
-#elif defined(CONFIG_CPU_V7)
-
-static void icedcc_putc(int ch)
-{
-       asm(
-       "wait:  mrc     p14, 0, pc, c0, c1, 0                   \n\
-               bcs     wait                                    \n\
-               mcr     p14, 0, %0, c0, c5, 0                   "
-       : : "r" (ch));
-}
 
 #elif defined(CONFIG_CPU_XSCALE)
 
index d2d983be096d192da7b483dbf75a18156fd8767a..bcd66e00bdbeec688363cbd0e2178fcc158fcc8a 100644 (file)
@@ -25,7 +25,7 @@
                .macro  addruart, rp, rv
                .endm
 
-#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
 
                .macro  senduart, rd, rx
                mcr     p14, 0, \rd, c0, c5, 0
 1002:
                .endm
 
-#elif defined(CONFIG_CPU_V7)
-
-               .macro  senduart, rd, rx
-               mcr     p14, 0, \rd, c0, c5, 0
-               .endm
-
-               .macro  busyuart, rd, rx
-busy:          mrc     p14, 0, pc, c0, c1, 0
-               bcs     busy
-               .endm
-
-               .macro  waituart, rd, rx
-wait:          mrc     p14, 0, pc, c0, c1, 0
-               bcs     wait
-
-               .endm
-
 #elif defined(CONFIG_CPU_XSCALE)
 
                .macro  senduart, rd, rx
This page took 0.02746 seconds and 5 git commands to generate.