Skip to content

Commit 76e3faf

Browse files
committed
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>
1 parent 97bcb0f commit 76e3faf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/arm/include/debug/pl01x.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525

2626
.macro waituart,rd,rx
2727
1001: ldr \rd, [\rx, #UART01x_FR]
28+
ARM_BE8( rev \rd, \rd )
2829
tst \rd, #UART01x_FR_TXFF
2930
bne 1001b
3031
.endm
3132

3233
.macro busyuart,rd,rx
3334
1001: ldr \rd, [\rx, #UART01x_FR]
35+
ARM_BE8( rev \rd, \rd )
3436
tst \rd, #UART01x_FR_BUSY
3537
bne 1001b
3638
.endm

0 commit comments

Comments
 (0)