Commit 5cd0c344 authored by Russell King's avatar Russell King

[PATCH] ARM: decompressor: use platform debug macros

Rather than duplicate the assembly for debug macros in the
decompressor head.S, use asm/arch/debug-macros.S instead.
Signed-off-by: default avatarRussell King <rmk@arm.linux.org.uk>
parent ac09f698
...@@ -18,48 +18,30 @@ ...@@ -18,48 +18,30 @@
* Please select one of the following when turning on debugging. * Please select one of the following when turning on debugging.
*/ */
#ifdef DEBUG #ifdef DEBUG
#if defined(CONFIG_DEBUG_DC21285_PORT)
.macro loadsp, rb #include <asm/arch/debug-macro.S>
mov \rb, #0x42000000
.endm #if defined(CONFIG_DEBUG_ICEDCC)
.macro writeb, rb
str \rb, [r3, #0x160]
.endm
#elif defined(CONFIG_DEBUG_ICEDCC)
.macro loadsp, rb
.endm
.macro writeb, rb
mcr p14, 0, \rb, c0, c1, 0
.endm
#elif defined(CONFIG_FOOTBRIDGE)
.macro loadsp, rb
mov \rb, #0x7c000000
.endm
.macro writeb, rb
strb \rb, [r3, #0x3f8]
.endm
#elif defined(CONFIG_ARCH_RPC)
.macro loadsp, rb .macro loadsp, rb
mov \rb, #0x03000000
orr \rb, \rb, #0x00010000
.endm .endm
.macro writeb, rb .macro writeb, ch, rb
strb \rb, [r3, #0x3f8 << 2] mcr p14, 0, \ch, c0, c1, 0
.endm
#elif defined(CONFIG_ARCH_INTEGRATOR)
.macro loadsp, rb
mov \rb, #0x16000000
.endm .endm
.macro writeb, rb #else
strb \rb, [r3, #0] .macro writeb, ch, rb
senduart \ch, \rb
.endm .endm
#elif defined(CONFIG_ARCH_PXA) /* Xscale-type */
#if defined(CONFIG_FOOTBRIDGE) || \
defined(CONFIG_ARCH_RPC) || \
defined(CONFIG_ARCH_INTEGRATOR) || \
defined(CONFIG_ARCH_PXA) || \
defined(CONFIG_ARCH_IXP4XX) || \
defined(CONFIG_ARCH_IXP2000) || \
defined(CONFIG_ARCH_LH7A40X) || \
defined(CONFIG_ARCH_OMAP)
.macro loadsp, rb .macro loadsp, rb
mov \rb, #0x40000000 addruart \rb
orr \rb, \rb, #0x00100000
.endm
.macro writeb, rb
strb \rb, [r3, #0]
.endm .endm
#elif defined(CONFIG_ARCH_SA1100) #elif defined(CONFIG_ARCH_SA1100)
.macro loadsp, rb .macro loadsp, rb
...@@ -70,64 +52,21 @@ ...@@ -70,64 +52,21 @@
add \rb, \rb, #0x00010000 @ Ser1 add \rb, \rb, #0x00010000 @ Ser1
# endif # endif
.endm .endm
.macro writeb, rb
str \rb, [r3, #0x14] @ UTDR
.endm
#elif defined(CONFIG_ARCH_IXP4XX)
.macro loadsp, rb
mov \rb, #0xc8000000
.endm
.macro writeb, rb
str \rb, [r3, #0]
#elif defined(CONFIG_ARCH_IXP2000)
.macro loadsp, rb
mov \rb, #0xc0000000
orr \rb, \rb, #0x00030000
.endm
.macro writeb, rb
str \rb, [r3, #0]
.endm
#elif defined(CONFIG_ARCH_LH7A40X)
.macro loadsp, rb
ldr \rb, =0x80000700 @ UART2 UARTBASE
.endm
.macro writeb, rb
strb \rb, [r3, #0]
.endm
#elif defined(CONFIG_ARCH_OMAP)
.macro loadsp, rb
mov \rb, #0xff000000 @ physical base address
add \rb, \rb, #0x00fb0000
#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
add \rb, \rb, #0x00000800
#endif
#ifdef CONFIG_OMAP_LL_DEBUG_UART3
add \rb, \rb, #0x00009000
#endif
.endm
.macro writeb, rb
strb \rb, [r3]
.endm
#elif defined(CONFIG_ARCH_IOP331) #elif defined(CONFIG_ARCH_IOP331)
.macro loadsp, rb .macro loadsp, rb
mov \rb, #0xff000000 mov \rb, #0xff000000
orr \rb, \rb, #0x00ff0000 orr \rb, \rb, #0x00ff0000
orr \rb, \rb, #0x0000f700 @ location of the UART orr \rb, \rb, #0x0000f700 @ location of the UART
.endm .endm
.macro writeb, rb
str \rb, [r3, #0]
.endm
#elif defined(CONFIG_ARCH_S3C2410) #elif defined(CONFIG_ARCH_S3C2410)
.macro loadsp, rb .macro loadsp, rb
mov \rb, #0x50000000 mov \rb, #0x50000000
add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT
.endm .endm
.macro writeb, rb
strb \rb, [r3, #0x20]
.endm
#else #else
#error no serial architecture defined #error no serial architecture defined
#endif #endif
#endif
#endif #endif
.macro kputc,val .macro kputc,val
...@@ -734,7 +673,7 @@ puts: loadsp r3 ...@@ -734,7 +673,7 @@ puts: loadsp r3
1: ldrb r2, [r0], #1 1: ldrb r2, [r0], #1
teq r2, #0 teq r2, #0
moveq pc, lr moveq pc, lr
2: writeb r2 2: writeb r2, r3
mov r1, #0x00020000 mov r1, #0x00020000
3: subs r1, r1, #1 3: subs r1, r1, #1
bne 3b bne 3b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment