diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-07 17:26:09 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-10-07 17:26:09 -0400 |
commit | a2b7ba9ca471438c2bb0c3bdf0ff2ed7fdce3d2f (patch) | |
tree | 65ad52e682b45c7fdfbd6725a34546b29f4dc907 /arch/arm/plat-s3c/include/plat/debug-macro.S | |
parent | 4330ed8ed4da360ac1ca14b0fddff4c05b10de16 (diff) |
[ARM] S3C24XX: Move files out of include/asm-arm/plat-s3c*
First move of items out of include/asm-arm/plat-s3c* to their
new homes under arch/arm/plat-s3c/include/plat and
arch/arm/plat-s3c24xx/include/plat directories.
Note, we have to create a dummy arch/arm/plat-s3c/Makefile to
allow us to add arch/arm/plat-s3c/include/plat to the path.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/include/plat/debug-macro.S')
-rw-r--r-- | arch/arm/plat-s3c/include/plat/debug-macro.S | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/debug-macro.S b/arch/arm/plat-s3c/include/plat/debug-macro.S new file mode 100644 index 000000000000..4aa7e2e6c001 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/debug-macro.S | |||
@@ -0,0 +1,75 @@ | |||
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 <plat/regs-serial.h> | ||
13 | |||
14 | /* The S3C2440 implementations are used by default as they are the | ||
15 | * most widely re-used */ | ||
16 | |||
17 | .macro fifo_level_s3c2440 rd, rx | ||
18 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
19 | and \rd, \rd, #S3C2440_UFSTAT_TXMASK | ||
20 | .endm | ||
21 | |||
22 | #ifndef fifo_level | ||
23 | #define fifo_level fifo_level_s3c2410 | ||
24 | #endif | ||
25 | |||
26 | .macro fifo_full_s3c2440 rd, rx | ||
27 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
28 | tst \rd, #S3C2440_UFSTAT_TXFULL | ||
29 | .endm | ||
30 | |||
31 | #ifndef fifo_full | ||
32 | #define fifo_full fifo_full_s3c2440 | ||
33 | #endif | ||
34 | |||
35 | .macro senduart,rd,rx | ||
36 | strb \rd, [\rx, # S3C2410_UTXH ] | ||
37 | .endm | ||
38 | |||
39 | .macro busyuart, rd, rx | ||
40 | ldr \rd, [ \rx, # S3C2410_UFCON ] | ||
41 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | ||
42 | beq 1001f @ | ||
43 | @ FIFO enabled... | ||
44 | 1003: | ||
45 | fifo_full \rd, \rx | ||
46 | bne 1003b | ||
47 | b 1002f | ||
48 | |||
49 | 1001: | ||
50 | @ busy waiting for non fifo | ||
51 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
52 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
53 | beq 1001b | ||
54 | |||
55 | 1002: @ exit busyuart | ||
56 | .endm | ||
57 | |||
58 | .macro waituart,rd,rx | ||
59 | ldr \rd, [ \rx, # S3C2410_UFCON ] | ||
60 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | ||
61 | beq 1001f @ | ||
62 | @ FIFO enabled... | ||
63 | 1003: | ||
64 | fifo_level \rd, \rx | ||
65 | teq \rd, #0 | ||
66 | bne 1003b | ||
67 | b 1002f | ||
68 | 1001: | ||
69 | @ idle waiting for non fifo | ||
70 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
71 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
72 | beq 1001b | ||
73 | |||
74 | 1002: @ exit busyuart | ||
75 | .endm | ||