Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Ben Dooks 76e3faf1 97bcb0fe

+2
+2
arch/arm/include/debug/pl01x.S
··· 25 25 26 26 .macro waituart,rd,rx 27 27 1001: ldr \rd, [\rx, #UART01x_FR] 28 + ARM_BE8( rev \rd, \rd ) 28 29 tst \rd, #UART01x_FR_TXFF 29 30 bne 1001b 30 31 .endm 31 32 32 33 .macro busyuart,rd,rx 33 34 1001: ldr \rd, [\rx, #UART01x_FR] 35 + ARM_BE8( rev \rd, \rd ) 34 36 tst \rd, #UART01x_FR_BUSY 35 37 bne 1001b 36 38 .endm