Commit 6ef4e479 authored by Ben Dooks's avatar Ben Dooks Committed by Dinh Nguyen

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: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarDinh Nguyen <dinguyen@opensource.altera.com>
parent 5ebe6afa
...@@ -16,11 +16,14 @@ ...@@ -16,11 +16,14 @@
#ifdef CONFIG_DEBUG_UART_8250_WORD #ifdef CONFIG_DEBUG_UART_8250_WORD
.macro store, rd, rx:vararg .macro store, rd, rx:vararg
ARM_BE8(rev \rd, \rd)
str \rd, \rx str \rd, \rx
ARM_BE8(rev \rd, \rd)
.endm .endm
.macro load, rd, rx:vararg .macro load, rd, rx:vararg
ldr \rd, \rx ldr \rd, \rx
ARM_BE8(rev \rd, \rd)
.endm .endm
#else #else
.macro store, rd, rx:vararg .macro store, rd, rx:vararg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment