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

ARM: debug: fix big endian operation for 8250 word mode

If the 8250 debug code is used in word mode on an big endian
host then the writes need to be change into little endian for
the bus.

Note, we have to re-convert the value back as the debug code
will inspect the value after writing it to see if a newline
has been written.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>

authored by

Ben Dooks and committed by
Dinh Nguyen
6ef4e479 5ebe6afa

+3
+3
arch/arm/include/debug/8250.S
··· 16 16 17 17 #ifdef CONFIG_DEBUG_UART_8250_WORD 18 18 .macro store, rd, rx:vararg 19 + ARM_BE8(rev \rd, \rd) 19 20 str \rd, \rx 21 + ARM_BE8(rev \rd, \rd) 20 22 .endm 21 23 22 24 .macro load, rd, rx:vararg 23 25 ldr \rd, \rx 26 + ARM_BE8(rev \rd, \rd) 24 27 .endm 25 28 #else 26 29 .macro store, rd, rx:vararg