diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-davinci/include/mach/debug-macro.S | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/debug-macro.S | 49 |
1 files changed, 28 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..f8b7ea4f6235 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -24,40 +24,47 @@ | |||
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 |
30 | .popsection | 33 | .popsection |
31 | 34 | ||
32 | .macro addruart, rx, tmp | 35 | .macro addruart, rp, rv |
33 | 36 | ||
34 | /* Use davinci_uart_phys/virt if already configured */ | 37 | /* Use davinci_uart_phys/virt if already configured */ |
35 | 10: mrc p15, 0, \rx, c1, c0 | 38 | 10: mrc p15, 0, \rp, c1, c0 |
36 | tst \rx, #1 @ MMU enabled? | 39 | tst \rp, #1 @ MMU enabled? |
37 | ldreq \rx, =__virt_to_phys(davinci_uart_phys) | 40 | ldreq \rp, =davinci_uart_v2p(davinci_uart_phys) |
38 | ldrne \rx, =davinci_uart_virt | 41 | ldrne \rp, =davinci_uart_phys |
39 | ldr \rx, [\rx] | 42 | add \rv, \rp, #4 @ davinci_uart_virt |
40 | cmp \rx, #0 @ is port configured? | 43 | ldr \rp, [\rp, #0] |
44 | ldr \rv, [\rv, #0] | ||
45 | cmp \rp, #0 @ is port configured? | ||
46 | cmpne \rv, #0 | ||
41 | bne 99f @ already configured | 47 | bne 99f @ already configured |
42 | 48 | ||
43 | mrc p15, 0, \rx, c1, c0 | 49 | /* Check the debug UART address set in uncompress.h */ |
44 | tst \rx, #1 @ MMU enabled? | 50 | mrc p15, 0, \rp, c1, c0 |
51 | tst \rp, #1 @ MMU enabled? | ||
45 | 52 | ||
46 | /* Copy uart phys address from decompressor uart info */ | 53 | /* Copy uart phys address from decompressor uart info */ |
47 | ldreq \tmp, =__virt_to_phys(davinci_uart_phys) | 54 | ldreq \rv, =davinci_uart_v2p(davinci_uart_phys) |
48 | ldrne \tmp, =davinci_uart_phys | 55 | ldrne \rv, =davinci_uart_phys |
49 | ldreq \rx, =DAVINCI_UART_INFO | 56 | ldreq \rp, =DAVINCI_UART_INFO |
50 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 57 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
51 | ldr \rx, [\rx, #0] | 58 | ldr \rp, [\rp, #0] |
52 | str \rx, [\tmp] | 59 | str \rp, [\rv] |
53 | 60 | ||
54 | /* Copy uart virt address from decompressor uart info */ | 61 | /* Copy uart virt address from decompressor uart info */ |
55 | ldreq \tmp, =__virt_to_phys(davinci_uart_virt) | 62 | ldreq \rv, =davinci_uart_v2p(davinci_uart_virt) |
56 | ldrne \tmp, =davinci_uart_virt | 63 | ldrne \rv, =davinci_uart_virt |
57 | ldreq \rx, =DAVINCI_UART_INFO | 64 | ldreq \rp, =DAVINCI_UART_INFO |
58 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 65 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
59 | ldr \rx, [\rx, #4] | 66 | ldr \rp, [\rp, #4] |
60 | str \rx, [\tmp] | 67 | str \rp, [\rv] |
61 | 68 | ||
62 | b 10b | 69 | b 10b |
63 | 99: | 70 | 99: |