diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-19 19:52:56 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-04-19 19:54:15 -0400 |
commit | 5cf4c80a145d79db928ff55226e731de55c87644 (patch) | |
tree | 369d0a15dab38bd515d93909d84737f05b34f90a /arch/arm/mach-davinci | |
parent | f0e615c3cb72b42191b558c130409335812621d8 (diff) |
davinci: fix DEBUG_LL code for p2v changes
Fixup davinci UART low-level debug code for new ARM generic p2v changes.
Based on OMAP changes by Tony Lindgren
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/debug-macro.S | 13 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/serial.h | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index 9f1befc5ac38..f8b7ea4f6235 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -24,6 +24,9 @@ | |||
24 | 24 | ||
25 | #define UART_SHIFT 2 | 25 | #define UART_SHIFT 2 |
26 | 26 | ||
27 | #define davinci_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
28 | #define davinci_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
29 | |||
27 | .pushsection .data | 30 | .pushsection .data |
28 | davinci_uart_phys: .word 0 | 31 | davinci_uart_phys: .word 0 |
29 | davinci_uart_virt: .word 0 | 32 | davinci_uart_virt: .word 0 |
@@ -34,7 +37,7 @@ davinci_uart_virt: .word 0 | |||
34 | /* Use davinci_uart_phys/virt if already configured */ | 37 | /* Use davinci_uart_phys/virt if already configured */ |
35 | 10: mrc p15, 0, \rp, c1, c0 | 38 | 10: mrc p15, 0, \rp, c1, c0 |
36 | tst \rp, #1 @ MMU enabled? | 39 | tst \rp, #1 @ MMU enabled? |
37 | ldreq \rp, =__virt_to_phys(davinci_uart_phys) | 40 | ldreq \rp, =davinci_uart_v2p(davinci_uart_phys) |
38 | ldrne \rp, =davinci_uart_phys | 41 | ldrne \rp, =davinci_uart_phys |
39 | add \rv, \rp, #4 @ davinci_uart_virt | 42 | add \rv, \rp, #4 @ davinci_uart_virt |
40 | ldr \rp, [\rp, #0] | 43 | ldr \rp, [\rp, #0] |
@@ -48,18 +51,18 @@ davinci_uart_virt: .word 0 | |||
48 | tst \rp, #1 @ MMU enabled? | 51 | tst \rp, #1 @ MMU enabled? |
49 | 52 | ||
50 | /* Copy uart phys address from decompressor uart info */ | 53 | /* Copy uart phys address from decompressor uart info */ |
51 | ldreq \rv, =__virt_to_phys(davinci_uart_phys) | 54 | ldreq \rv, =davinci_uart_v2p(davinci_uart_phys) |
52 | ldrne \rv, =davinci_uart_phys | 55 | ldrne \rv, =davinci_uart_phys |
53 | ldreq \rp, =DAVINCI_UART_INFO | 56 | ldreq \rp, =DAVINCI_UART_INFO |
54 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) | 57 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
55 | ldr \rp, [\rp, #0] | 58 | ldr \rp, [\rp, #0] |
56 | str \rp, [\rv] | 59 | str \rp, [\rv] |
57 | 60 | ||
58 | /* Copy uart virt address from decompressor uart info */ | 61 | /* Copy uart virt address from decompressor uart info */ |
59 | ldreq \rv, =__virt_to_phys(davinci_uart_virt) | 62 | ldreq \rv, =davinci_uart_v2p(davinci_uart_virt) |
60 | ldrne \rv, =davinci_uart_virt | 63 | ldrne \rv, =davinci_uart_virt |
61 | ldreq \rp, =DAVINCI_UART_INFO | 64 | ldreq \rp, =DAVINCI_UART_INFO |
62 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) | 65 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
63 | ldr \rp, [\rp, #4] | 66 | ldr \rp, [\rp, #4] |
64 | str \rp, [\rv] | 67 | str \rp, [\rv] |
65 | 68 | ||
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 8051110b8ac3..c9e6ce185a66 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). | 23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). |
24 | */ | 24 | */ |
25 | #define DAVINCI_UART_INFO (PHYS_OFFSET + 0x3ff8) | 25 | #define DAVINCI_UART_INFO (PLAT_PHYS_OFFSET + 0x3ff8) |
26 | 26 | ||
27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) | 27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) |
28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) | 28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) |