summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2013-02-06 18:25:36 +0000
committerBen Dooks <ben.dooks@codethink.co.uk>2013-09-03 17:36:39 +0100
commit3a92fbe0d156bed834948bc82be8d634dc9ee934 (patch)
tree2a1f9d0e0a3e9c6cd6f31806c8d6f439dc89d4e2
parent0da50e33f5a8a8508d8dd88a273d08c559ab2ffb (diff)
downloadlinux-3a92fbe0d156bed834948bc82be8d634dc9ee934.tar.gz
ARM: pl01x debug code endian fix
The PL01X debug code needs to take into account which endian mode the processor is running in. If it is big-endian, ensure the data is swapped appropriately. Note, we could do this slightly more efficiently if we have an macro to do the necessary swap for the bits used by test. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-rw-r--r--arch/arm/include/asm/hardware/debug-pl01x.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/hardware/debug-pl01x.S b/arch/arm/include/asm/hardware/debug-pl01x.S
index f9fd083eff63..6489d1ffe3c8 100644
--- a/arch/arm/include/asm/hardware/debug-pl01x.S
+++ b/arch/arm/include/asm/hardware/debug-pl01x.S
@@ -18,12 +18,14 @@
.macro waituart,rd,rx
1001: ldr \rd, [\rx, #UART01x_FR]
+ ARM_BE8( rev \rd, \rd )
tst \rd, #UART01x_FR_TXFF
bne 1001b
.endm
.macro busyuart,rd,rx
1001: ldr \rd, [\rx, #UART01x_FR]
+ ARM_BE8( rev \rd, \rd )
tst \rd, #UART01x_FR_BUSY
bne 1001b
.endm