diff options
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/debug-macro.S | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index f761dfdb8689..9f1befc5ac38 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -29,35 +29,39 @@ davinci_uart_phys: .word 0 | |||
29 | davinci_uart_virt: .word 0 | 29 | davinci_uart_virt: .word 0 |
30 | .popsection | 30 | .popsection |
31 | 31 | ||
32 | .macro addruart, rx, tmp | 32 | .macro addruart, rp, rv |
33 | 33 | ||
34 | /* Use davinci_uart_phys/virt if already configured */ | 34 | /* Use davinci_uart_phys/virt if already configured */ |
35 | 10: mrc p15, 0, \rx, c1, c0 | 35 | 10: mrc p15, 0, \rp, c1, c0 |
36 | tst \rx, #1 @ MMU enabled? | 36 | tst \rp, #1 @ MMU enabled? |
37 | ldreq \rx, =__virt_to_phys(davinci_uart_phys) | 37 | ldreq \rp, =__virt_to_phys(davinci_uart_phys) |
38 | ldrne \rx, =davinci_uart_virt | 38 | ldrne \rp, =davinci_uart_phys |
39 | ldr \rx, [\rx] | 39 | add \rv, \rp, #4 @ davinci_uart_virt |
40 | cmp \rx, #0 @ is port configured? | 40 | ldr \rp, [\rp, #0] |
41 | ldr \rv, [\rv, #0] | ||
42 | cmp \rp, #0 @ is port configured? | ||
43 | cmpne \rv, #0 | ||
41 | bne 99f @ already configured | 44 | bne 99f @ already configured |
42 | 45 | ||
43 | mrc p15, 0, \rx, c1, c0 | 46 | /* Check the debug UART address set in uncompress.h */ |
44 | tst \rx, #1 @ MMU enabled? | 47 | mrc p15, 0, \rp, c1, c0 |
48 | tst \rp, #1 @ MMU enabled? | ||
45 | 49 | ||
46 | /* Copy uart phys address from decompressor uart info */ | 50 | /* Copy uart phys address from decompressor uart info */ |
47 | ldreq \tmp, =__virt_to_phys(davinci_uart_phys) | 51 | ldreq \rv, =__virt_to_phys(davinci_uart_phys) |
48 | ldrne \tmp, =davinci_uart_phys | 52 | ldrne \rv, =davinci_uart_phys |
49 | ldreq \rx, =DAVINCI_UART_INFO | 53 | ldreq \rp, =DAVINCI_UART_INFO |
50 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 54 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) |
51 | ldr \rx, [\rx, #0] | 55 | ldr \rp, [\rp, #0] |
52 | str \rx, [\tmp] | 56 | str \rp, [\rv] |
53 | 57 | ||
54 | /* Copy uart virt address from decompressor uart info */ | 58 | /* Copy uart virt address from decompressor uart info */ |
55 | ldreq \tmp, =__virt_to_phys(davinci_uart_virt) | 59 | ldreq \rv, =__virt_to_phys(davinci_uart_virt) |
56 | ldrne \tmp, =davinci_uart_virt | 60 | ldrne \rv, =davinci_uart_virt |
57 | ldreq \rx, =DAVINCI_UART_INFO | 61 | ldreq \rp, =DAVINCI_UART_INFO |
58 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 62 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) |
59 | ldr \rx, [\rx, #4] | 63 | ldr \rp, [\rp, #4] |
60 | str \rx, [\tmp] | 64 | str \rp, [\rv] |
61 | 65 | ||
62 | b 10b | 66 | b 10b |
63 | 99: | 67 | 99: |