aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/plat-s3c
diff options
context:
space:
mode:
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