[PATCH 05/23] ARM: pl01x debug code endian fix
Ben Dooks
ben.dooks at codethink.co.uk
Tue Oct 8 18:34:21 EDT 2013
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 at arm.com>
Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
---
arch/arm/include/debug/pl01x.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/include/debug/pl01x.S b/arch/arm/include/debug/pl01x.S
index 37c6895b..92ef808 100644
--- a/arch/arm/include/debug/pl01x.S
+++ b/arch/arm/include/debug/pl01x.S
@@ -25,12 +25,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
--
1.8.4.rc3
More information about the linux-arm-kernel
mailing list