[PATCH 05/13] ARM: at91: debug: fix debug in big endian mode

Ben Dooks ben.dooks at codethink.co.uk
Wed Mar 18 08:53:04 PDT 2015


Add appropriate endian swaps for when the CPU is in big endian

Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
--
CC: Andrew Victor <linux at maxim.org.za>
CC: Nicolas Ferre <nicolas.ferre at atmel.com>
CC: Jean-Christophe Plagniol-Villard <plagnioj at jcrosoft.com>
CC: Russell King <linux at arm.linux.org.uk>
CC: Linux ARM Kernel <linux-arm-kernel at lists.infradead.org>
---
 arch/arm/include/debug/at91.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
index c3c45e6..0217f8d 100644
--- a/arch/arm/include/debug/at91.S
+++ b/arch/arm/include/debug/at91.S
@@ -40,12 +40,14 @@
 
 	.macro	waituart,rd,rx
 1001:	ldr	\rd, [\rx, #(AT91_DBGU_SR)]		@ Read Status Register
+ARM_BE8(rev	\rd, \rd)
 	tst	\rd, #AT91_DBGU_TXRDY			@ DBGU_TXRDY = 1 when ready to transmit
 	beq	1001b
 	.endm
 
 	.macro	busyuart,rd,rx
 1001:	ldr	\rd, [\rx, #(AT91_DBGU_SR)]		@ Read Status Register
+ARM_BE8(rev	\rd, \rd)
 	tst	\rd, #AT91_DBGU_TXEMPTY			@ DBGU_TXEMPTY = 1 when transmission complete
 	beq	1001b
 	.endm
-- 
2.1.4




More information about the linux-arm-kernel mailing list