ARM: debug: fix big endian operation for 8250 word mode
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 25 Mar 2015 11:27:46 +0000 (11:27 +0000)
committerDinh Nguyen <dinguyen@opensource.altera.com>
Mon, 11 May 2015 18:59:23 +0000 (13:59 -0500)
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>
arch/arm/include/debug/8250.S

index 7a2baf913aa0bd669f58b12d028e6c86cb9dcda4..7f7446f6f8060e446c7dc8fe81d3b1a501a04f1f 100644 (file)
 
 #ifdef CONFIG_DEBUG_UART_8250_WORD
                .macro  store, rd, rx:vararg
+        ARM_BE8(rev \rd, \rd)
                str     \rd, \rx
+        ARM_BE8(rev \rd, \rd)
                .endm
 
                .macro  load, rd, rx:vararg
                ldr     \rd, \rx
+       ARM_BE8(rev \rd, \rd)
                .endm
 #else
                .macro  store, rd, rx:vararg
This page took 0.02683 seconds and 5 git commands to generate.