Skip to content

Commit 6ef4e47

Browse files
bjdooks-ctDinh Nguyen
authored andcommitted
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>
1 parent 5ebe6af commit 6ef4e47

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616

1717
#ifdef CONFIG_DEBUG_UART_8250_WORD
1818
.macro store, rd, rx:vararg
19+
ARM_BE8(rev \rd, \rd)
1920
str \rd, \rx
21+
ARM_BE8(rev \rd, \rd)
2022
.endm
2123

2224
.macro load, rd, rx:vararg
2325
ldr \rd, \rx
26+
ARM_BE8(rev \rd, \rd)
2427
.endm
2528
#else
2629
.macro store, rd, rx:vararg

0 commit comments

Comments
 (0)