Commit 4fdfa862 authored by Ben Dooks's avatar Ben Dooks Committed by Krzysztof Kozlowski

ARM: EXYNOS: Fixup debug macros for big-endian

The exynos low-level debug macros need to be fixed if the system is being
built big endian. Add the necessary endian swaps for accessing the registers
to get output working again
Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
parent da81593a
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
.macro fifo_level_s5pv210 rd, rx .macro fifo_level_s5pv210 rd, rx
ldr \rd, [\rx, # S3C2410_UFSTAT] ldr \rd, [\rx, # S3C2410_UFSTAT]
ARM_BE8(rev \rd, \rd)
and \rd, \rd, #S5PV210_UFSTAT_TXMASK and \rd, \rd, #S5PV210_UFSTAT_TXMASK
.endm .endm
.macro fifo_full_s5pv210 rd, rx .macro fifo_full_s5pv210 rd, rx
ldr \rd, [\rx, # S3C2410_UFSTAT] ldr \rd, [\rx, # S3C2410_UFSTAT]
ARM_BE8(rev \rd, \rd)
tst \rd, #S5PV210_UFSTAT_TXFULL tst \rd, #S5PV210_UFSTAT_TXFULL
.endm .endm
...@@ -28,6 +30,7 @@ ...@@ -28,6 +30,7 @@
.macro fifo_level_s3c2440 rd, rx .macro fifo_level_s3c2440 rd, rx
ldr \rd, [\rx, # S3C2410_UFSTAT] ldr \rd, [\rx, # S3C2410_UFSTAT]
ARM_BE8(rev \rd, \rd)
and \rd, \rd, #S3C2440_UFSTAT_TXMASK and \rd, \rd, #S3C2440_UFSTAT_TXMASK
.endm .endm
...@@ -37,6 +40,7 @@ ...@@ -37,6 +40,7 @@
.macro fifo_full_s3c2440 rd, rx .macro fifo_full_s3c2440 rd, rx
ldr \rd, [\rx, # S3C2410_UFSTAT] ldr \rd, [\rx, # S3C2410_UFSTAT]
ARM_BE8(rev \rd, \rd)
tst \rd, #S3C2440_UFSTAT_TXFULL tst \rd, #S3C2440_UFSTAT_TXFULL
.endm .endm
...@@ -50,6 +54,7 @@ ...@@ -50,6 +54,7 @@
.macro busyuart, rd, rx .macro busyuart, rd, rx
ldr \rd, [\rx, # S3C2410_UFCON] ldr \rd, [\rx, # S3C2410_UFCON]
ARM_BE8(rev \rd, \rd)
tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
beq 1001f @ beq 1001f @
@ FIFO enabled... @ FIFO enabled...
...@@ -61,6 +66,7 @@ ...@@ -61,6 +66,7 @@
1001: 1001:
@ busy waiting for non fifo @ busy waiting for non fifo
ldr \rd, [\rx, # S3C2410_UTRSTAT] ldr \rd, [\rx, # S3C2410_UTRSTAT]
ARM_BE8(rev \rd, \rd)
tst \rd, #S3C2410_UTRSTAT_TXFE tst \rd, #S3C2410_UTRSTAT_TXFE
beq 1001b beq 1001b
...@@ -69,6 +75,7 @@ ...@@ -69,6 +75,7 @@
.macro waituart,rd,rx .macro waituart,rd,rx
ldr \rd, [\rx, # S3C2410_UFCON] ldr \rd, [\rx, # S3C2410_UFCON]
ARM_BE8(rev \rd, \rd)
tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
beq 1001f @ beq 1001f @
@ FIFO enabled... @ FIFO enabled...
...@@ -80,6 +87,7 @@ ...@@ -80,6 +87,7 @@
1001: 1001:
@ idle waiting for non fifo @ idle waiting for non fifo
ldr \rd, [\rx, # S3C2410_UTRSTAT] ldr \rd, [\rx, # S3C2410_UTRSTAT]
ARM_BE8(rev \rd, \rd)
tst \rd, #S3C2410_UTRSTAT_TXFE tst \rd, #S3C2410_UTRSTAT_TXFE
beq 1001b beq 1001b
......
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