diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-17 02:59:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 02:59:10 -0400 |
commit | cc4949e1fdade5d063e9f8783cf0e2cc92041ce5 (patch) | |
tree | 4023bd641bfe464efbde518fb504d6865c9df014 /arch/arm/mach-davinci/include/mach/debug-macro.S | |
parent | 28b4868820a56de661f54742ff91b78e12f1e582 (diff) | |
parent | 300df7dc89cc276377fc020704e34875d5c473b6 (diff) |
Merge branch 'linus' into x86/urgent
Merge reason: pull in latest to fix a bug in it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/debug-macro.S')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/debug-macro.S | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index e6c0f0d5d062..de3fc2182b47 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -9,6 +9,16 @@ | |||
9 | * or implied. | 9 | * or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Modifications | ||
13 | * Jan 2009 Chaithrika U S Added senduart, busyuart, waituart | ||
14 | * macros, based on debug-8250.S file | ||
15 | * but using 32-bit accesses required for | ||
16 | * some davinci devices. | ||
17 | */ | ||
18 | |||
19 | #include <linux/serial_reg.h> | ||
20 | #define UART_SHIFT 2 | ||
21 | |||
12 | .macro addruart, rx | 22 | .macro addruart, rx |
13 | mrc p15, 0, \rx, c1, c0 | 23 | mrc p15, 0, \rx, c1, c0 |
14 | tst \rx, #1 @ MMU enabled? | 24 | tst \rx, #1 @ MMU enabled? |
@@ -17,5 +27,22 @@ | |||
17 | orr \rx, \rx, #0x00c20000 @ UART 0 | 27 | orr \rx, \rx, #0x00c20000 @ UART 0 |
18 | .endm | 28 | .endm |
19 | 29 | ||
20 | #define UART_SHIFT 2 | 30 | .macro senduart,rd,rx |
21 | #include <asm/hardware/debug-8250.S> | 31 | str \rd, [\rx, #UART_TX << UART_SHIFT] |
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
36 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
37 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
38 | bne 1002b | ||
39 | .endm | ||
40 | |||
41 | .macro waituart,rd,rx | ||
42 | #ifdef FLOW_CONTROL | ||
43 | 1001: ldr \rd, [\rx, #UART_MSR << UART_SHIFT] | ||
44 | tst \rd, #UART_MSR_CTS | ||
45 | beq 1001b | ||
46 | #endif | ||
47 | .endm | ||
48 | |||