summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/include/mach/debug-macro.S
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-09-01 20:32:21 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-09-26 10:11:27 -0400
commite020fe34f8fc5cb42c2f518ea120005b4d01923d (patch)
treebd24cc2095fa77cb7d5a89abebf8a089250cd2af /arch/arm/mach-davinci/include/mach/debug-macro.S
parentfa808a1ba5f9d40ad47c31f63691b1ded03a46f8 (diff)
ARM: mach-davinci: make DAVINCI_UART_INFO into a relative offset
This is the first step to remove PLAT_PHYS_OFFSET usage from the debug UART code. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/debug-macro.S')
-rw-r--r--arch/arm/mach-davinci/include/mach/debug-macro.S21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S
index 3cf4c1b4f33a..45fff2c61f48 100644
--- a/arch/arm/mach-davinci/include/mach/debug-macro.S
+++ b/arch/arm/mach-davinci/include/mach/debug-macro.S
@@ -50,21 +50,20 @@ davinci_uart_virt: .word 0
mrc p15, 0, \rp, c1, c0
tst \rp, #1 @ MMU enabled?
- /* Copy uart phys address from decompressor uart info */
+ and \rp, pc, #0xff000000
+ ldr \rv, =DAVINCI_UART_INFO_OFS
+ add \rp, \rp, \rv
+
ldreq \rv, =davinci_uart_v2p(davinci_uart_phys)
ldrne \rv, =davinci_uart_phys
- ldreq \rp, =DAVINCI_UART_INFO
- ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
- ldr \rp, [\rp, #0]
- str \rp, [\rv]
+
+ /* Copy uart phys address from decompressor uart info */
+ ldr \tmp, [\rp, #0]
+ str \tmp, [\rv, #0]
/* Copy uart virt address from decompressor uart info */
- ldreq \rv, =davinci_uart_v2p(davinci_uart_virt)
- ldrne \rv, =davinci_uart_virt
- ldreq \rp, =DAVINCI_UART_INFO
- ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO)
- ldr \rp, [\rp, #4]
- str \rp, [\rv]
+ ldr \tmp, [\rp, #4]
+ str \tmp, [\rv, #4]
b 10b
99: