Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e6d488a authored by Tony Lindgren's avatar Tony Lindgren Committed by Russell King
Browse files

ARM: 5910/1: ARM: Add tmp register for addruart and loadsp



Otherwise more complicated uart configuration won't be possible.
We can use r1 for tmp register for both head.S and debug.S.

NOTE: This patch depends on another patch to add the the tmp register
into all debug-macro.S files. That can be done with:

$ sed -i -e "s/addruart,rx|addruart, rx/addruart, rx, tmp/"
	arch/arm/*/include/*/debug-macro.S

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 200b7a8d
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -22,13 +22,13 @@
#if defined(CONFIG_DEBUG_ICEDCC)
#if defined(CONFIG_DEBUG_ICEDCC)


#ifdef CONFIG_CPU_V6
#ifdef CONFIG_CPU_V6
		.macro	loadsp, rb
		.macro	loadsp, rb, tmp
		.endm
		.endm
		.macro	writeb, ch, rb
		.macro	writeb, ch, rb
		mcr	p14, 0, \ch, c0, c5, 0
		mcr	p14, 0, \ch, c0, c5, 0
		.endm
		.endm
#elif defined(CONFIG_CPU_V7)
#elif defined(CONFIG_CPU_V7)
		.macro	loadsp, rb
		.macro	loadsp, rb, tmp
		.endm
		.endm
		.macro	writeb, ch, rb
		.macro	writeb, ch, rb
wait:		mrc	p14, 0, pc, c0, c1, 0
wait:		mrc	p14, 0, pc, c0, c1, 0
@@ -36,13 +36,13 @@ wait: mrc p14, 0, pc, c0, c1, 0
		mcr	p14, 0, \ch, c0, c5, 0
		mcr	p14, 0, \ch, c0, c5, 0
		.endm
		.endm
#elif defined(CONFIG_CPU_XSCALE)
#elif defined(CONFIG_CPU_XSCALE)
		.macro	loadsp, rb
		.macro	loadsp, rb, tmp
		.endm
		.endm
		.macro	writeb, ch, rb
		.macro	writeb, ch, rb
		mcr	p14, 0, \ch, c8, c0, 0
		mcr	p14, 0, \ch, c8, c0, 0
		.endm
		.endm
#else
#else
		.macro	loadsp, rb
		.macro	loadsp, rb, tmp
		.endm
		.endm
		.macro	writeb, ch, rb
		.macro	writeb, ch, rb
		mcr	p14, 0, \ch, c1, c0, 0
		mcr	p14, 0, \ch, c1, c0, 0
@@ -58,7 +58,7 @@ wait: mrc p14, 0, pc, c0, c1, 0
		.endm
		.endm


#if defined(CONFIG_ARCH_SA1100)
#if defined(CONFIG_ARCH_SA1100)
		.macro	loadsp, rb
		.macro	loadsp, rb, tmp
		mov	\rb, #0x80000000	@ physical base address
		mov	\rb, #0x80000000	@ physical base address
#ifdef CONFIG_DEBUG_LL_SER3
#ifdef CONFIG_DEBUG_LL_SER3
		add	\rb, \rb, #0x00050000	@ Ser3
		add	\rb, \rb, #0x00050000	@ Ser3
@@ -67,13 +67,13 @@ wait: mrc p14, 0, pc, c0, c1, 0
#endif
#endif
		.endm
		.endm
#elif defined(CONFIG_ARCH_S3C2410)
#elif defined(CONFIG_ARCH_S3C2410)
		.macro loadsp, rb
		.macro loadsp, rb, tmp
		mov	\rb, #0x50000000
		mov	\rb, #0x50000000
		add	\rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT
		add	\rb, \rb, #0x4000 * CONFIG_S3C_LOWLEVEL_UART_PORT
		.endm
		.endm
#else
#else
		.macro	loadsp,	rb
		.macro	loadsp,	rb, tmp
		addruart \rb
		addruart \rb, \tmp
		.endm
		.endm
#endif
#endif
#endif
#endif
@@ -1025,7 +1025,7 @@ phex: adr r3, phexbuf
		strb	r2, [r3, r1]
		strb	r2, [r3, r1]
		b	1b
		b	1b


puts:		loadsp	r3
puts:		loadsp	r3, r1
1:		ldrb	r2, [r0], #1
1:		ldrb	r2, [r0], #1
		teq	r2, #0
		teq	r2, #0
		moveq	pc, lr
		moveq	pc, lr
@@ -1042,7 +1042,7 @@ puts: loadsp r3
putc:
putc:
		mov	r2, r0
		mov	r2, r0
		mov	r0, #0
		mov	r0, #0
		loadsp	r3
		loadsp	r3, r1
		b	2b
		b	2b


memdump:	mov	r12, r0
memdump:	mov	r12, r0
+6 −6
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@


#if defined(CONFIG_CPU_V6)
#if defined(CONFIG_CPU_V6)


		.macro	addruart, rx
		.macro	addruart, rx, tmp
		.endm
		.endm


		.macro	senduart, rd, rx
		.macro	senduart, rd, rx
@@ -51,7 +51,7 @@


#elif defined(CONFIG_CPU_V7)
#elif defined(CONFIG_CPU_V7)


		.macro	addruart, rx
		.macro	addruart, rx, tmp
		.endm
		.endm


		.macro	senduart, rd, rx
		.macro	senduart, rd, rx
@@ -71,7 +71,7 @@ wait: mrc p14, 0, pc, c0, c1, 0


#elif defined(CONFIG_CPU_XSCALE)
#elif defined(CONFIG_CPU_XSCALE)


		.macro	addruart, rx
		.macro	addruart, rx, tmp
		.endm
		.endm


		.macro	senduart, rd, rx
		.macro	senduart, rd, rx
@@ -98,7 +98,7 @@ wait: mrc p14, 0, pc, c0, c1, 0


#else
#else


		.macro	addruart, rx
		.macro	addruart, rx, tmp
		.endm
		.endm


		.macro	senduart, rd, rx
		.macro	senduart, rd, rx
@@ -164,7 +164,7 @@ ENDPROC(printhex2)
		.ltorg
		.ltorg


ENTRY(printascii)
ENTRY(printascii)
		addruart r3
		addruart r3, r1
		b	2f
		b	2f
1:		waituart r2, r3
1:		waituart r2, r3
		senduart r1, r3
		senduart r1, r3
@@ -180,7 +180,7 @@ ENTRY(printascii)
ENDPROC(printascii)
ENDPROC(printascii)


ENTRY(printch)
ENTRY(printch)
		addruart r3
		addruart r3, r1
		mov	r1, r0
		mov	r1, r0
		mov	r0, #0
		mov	r0, #0
		b	1b
		b	1b
+1 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@
 */
 */


#include "hardware.h"
#include "hardware.h"
		.macro	addruart,rx
		.macro	addruart, rx, tmp
		mrc	p15, 0, \rx, c1, c0
		mrc	p15, 0, \rx, c1, c0
		tst	\rx, #1			@ MMU enabled?
		tst	\rx, #1			@ MMU enabled?
		moveq	\rx, #0x80000000		@ physical
		moveq	\rx, #0x80000000		@ physical
+1 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <mach/at91_dbgu.h>
#include <mach/at91_dbgu.h>


	.macro	addruart,rx
	.macro	addruart, rx, tmp
	mrc	p15, 0, \rx, c1, c0
	mrc	p15, 0, \rx, c1, c0
	tst	\rx, #1						@ MMU enabled?
	tst	\rx, #1						@ MMU enabled?
	ldreq	\rx, =(AT91_BASE_SYS + AT91_DBGU)		@ System peripherals (phys address)
	ldreq	\rx, =(AT91_BASE_SYS + AT91_DBGU)		@ System peripherals (phys address)
+1 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@


#include <asm/hardware/clps7111.h>
#include <asm/hardware/clps7111.h>


		.macro	addruart,rx
		.macro	addruart, rx, tmp
		mrc	p15, 0, \rx, c1, c0
		mrc	p15, 0, \rx, c1, c0
		tst	\rx, #1			@ MMU enabled?
		tst	\rx, #1			@ MMU enabled?
		moveq	\rx, #CLPS7111_PHYS_BASE
		moveq	\rx, #CLPS7111_PHYS_BASE
Loading