aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/plat-s3c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2007-07-22 11:08:48 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-22 11:44:27 -0400
commit498e03b619638826a7364faed61eb0a3d2a0f0c8 (patch)
treeb1bc5c8fb06328f85e02006100c1c7bbc46e5def /include/asm-arm/plat-s3c
parentd58153d86589b6bba2dd19f4c178252f8cf2ed4f (diff)
[ARM] 4510/1: S3C: split debug-macro support into plat-s3c
Move the common parts of the debug macros into include/asm-arm/plat-s3c ready to be used for the common S3C support. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/plat-s3c')
-rw-r--r--include/asm-arm/plat-s3c/debug-macro.S57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/asm-arm/plat-s3c/debug-macro.S b/include/asm-arm/plat-s3c/debug-macro.S
new file mode 100644
index 000000000000..a43bbfa90a0b
--- /dev/null
+++ b/include/asm-arm/plat-s3c/debug-macro.S
@@ -0,0 +1,57 @@
1/* linux/include/asm-arm/plat-s3c/debug-macro.S
2 *
3 * Copyright 2005, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <asm/plat-s3c/regs-serial.h>
13
14#define S3C2410_UART1_OFF (0x4000)
15
16 .macro senduart,rd,rx
17 strb \rd, [\rx, # S3C2410_UTXH ]
18 .endm
19
20 .macro busyuart, rd, rx
21 ldr \rd, [ \rx, # S3C2410_UFCON ]
22 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
23 beq 1001f @
24 @ FIFO enabled...
251003:
26 fifo_full \rd, \rx
27 bne 1003b
28 b 1002f
29
301001:
31 @ busy waiting for non fifo
32 ldr \rd, [ \rx, # S3C2410_UTRSTAT ]
33 tst \rd, #S3C2410_UTRSTAT_TXFE
34 beq 1001b
35
361002: @ exit busyuart
37 .endm
38
39 .macro waituart,rd,rx
40
41 ldr \rd, [ \rx, # S3C2410_UFCON ]
42 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
43 beq 1001f @
44 @ FIFO enabled...
451003:
46 fifo_level \rd, \rx
47 teq \rd, #0
48 bne 1003b
49 b 1002f
501001:
51 @ idle waiting for non fifo
52 ldr \rd, [ \rx, # S3C2410_UTRSTAT ]
53 tst \rd, #S3C2410_UTRSTAT_TXFE
54 beq 1001b
55
561002: @ exit busyuart
57 .endm