]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: pl01x debug code endian fix
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 6 Feb 2013 18:25:36 +0000 (18:25 +0000)
committerBen Dooks <ben.dooks@codethink.co.uk>
Sat, 19 Oct 2013 19:46:33 +0000 (20:46 +0100)
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>
arch/arm/include/debug/pl01x.S

index 37c6895b87e6d72ce5837e57a4bae0a367339cb2..92ef808a23377275124a59550b6ab86f3e163486 100644 (file)
 
                .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