Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76e3faf1 authored by Ben Dooks's avatar Ben Dooks
Browse files

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: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
parent 97bcb0fe
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -25,12 +25,14 @@


		.macro	waituart,rd,rx
		.macro	waituart,rd,rx
1001:		ldr	\rd, [\rx, #UART01x_FR]
1001:		ldr	\rd, [\rx, #UART01x_FR]
 ARM_BE8(	rev	\rd, \rd )
		tst	\rd, #UART01x_FR_TXFF
		tst	\rd, #UART01x_FR_TXFF
		bne	1001b
		bne	1001b
		.endm
		.endm


		.macro	busyuart,rd,rx
		.macro	busyuart,rd,rx
1001:		ldr	\rd, [\rx, #UART01x_FR]
1001:		ldr	\rd, [\rx, #UART01x_FR]
 ARM_BE8(	rev	\rd, \rd )
		tst	\rd, #UART01x_FR_BUSY
		tst	\rd, #UART01x_FR_BUSY
		bne	1001b
		bne	1001b
		.endm
		.endm