diff options
author | Ben Dooks <ben-linux@fluff.org> | 2007-07-22 11:10:23 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-22 11:44:29 -0400 |
commit | cbc4dbffc89fbaada94ae7873ad6631a701fd00e (patch) | |
tree | eb3bf936404858651972b01fb11430dd6c7525e3 /include/asm-arm/arch-s3c2410 | |
parent | b2627588cbeb70364357048854affd52bf02fe64 (diff) |
[ARM] 4512/1: S3C: rename the debug macros for per-cpu updates
Update the debug macros for use with the new per-cpu
configuration and usage.
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/arch-s3c2410')
-rw-r--r-- | include/asm-arm/arch-s3c2410/debug-macro.S | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index b0a44178b14e..6fcef3383f8e 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -14,9 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/arch/map.h> | 15 | #include <asm/arch/map.h> |
16 | #include <asm/arch/regs-gpio.h> | 16 | #include <asm/arch/regs-gpio.h> |
17 | |||
18 | #include <asm/plat-s3c/regs-serial.h> | 17 | #include <asm/plat-s3c/regs-serial.h> |
19 | #include <asm/plat-s3c/debug-macro.S> | ||
20 | 18 | ||
21 | #define S3C2410_UART1_OFF (0x4000) | 19 | #define S3C2410_UART1_OFF (0x4000) |
22 | #define SHIFT_2440TXF (14-9) | 20 | #define SHIFT_2440TXF (14-9) |
@@ -31,7 +29,7 @@ | |||
31 | #endif | 29 | #endif |
32 | .endm | 30 | .endm |
33 | 31 | ||
34 | .macro fifo_full rd, rx | 32 | .macro fifo_full_s3c24xx rd, rx |
35 | @ check for arm920 vs arm926. currently assume all arm926 | 33 | @ check for arm920 vs arm926. currently assume all arm926 |
36 | @ devices have an 64 byte FIFO identical to the s3c2440 | 34 | @ devices have an 64 byte FIFO identical to the s3c2440 |
37 | mrc p15, 0, \rd, c0, c0 | 35 | mrc p15, 0, \rd, c0, c0 |
@@ -52,7 +50,14 @@ | |||
52 | tst \rd, #S3C2410_UFSTAT_TXFULL | 50 | tst \rd, #S3C2410_UFSTAT_TXFULL |
53 | .endm | 51 | .endm |
54 | 52 | ||
55 | .macro fifo_level rd, rx | 53 | .macro fifo_full_s3c2410 rd, rx |
54 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
55 | tst \rd, #S3C2410_UFSTAT_TXFULL | ||
56 | .endm | ||
57 | |||
58 | /* fifo level reading */ | ||
59 | |||
60 | .macro fifo_level_s3c24xx rd, rx | ||
56 | mrc p15, 0, \rd, c1, c0 | 61 | mrc p15, 0, \rd, c1, c0 |
57 | tst \rd, #1 | 62 | tst \rd, #1 |
58 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) | 63 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
@@ -66,3 +71,27 @@ | |||
66 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK | 71 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK |
67 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK | 72 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK |
68 | .endm | 73 | .endm |
74 | |||
75 | .macro fifo_level_s3c2410 rd, rx | ||
76 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
77 | and \rd, \rd, #S3C2410_UFSTAT_TXMASK | ||
78 | .endm | ||
79 | |||
80 | /* Select the correct implementation depending on the configuration. The | ||
81 | * S3C2440 will get selected by default, as these are the most widely | ||
82 | * used variants of these | ||
83 | */ | ||
84 | |||
85 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) | ||
86 | #define fifo_full fifo_full_s3c2410 | ||
87 | #define fifo_level fifo_level_s3c2410 | ||
88 | #warning 2410only | ||
89 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) | ||
90 | #define fifo_full fifo_full_s3c24xx | ||
91 | #define fifo_level fifo_level_s3c24xx | ||
92 | #warning generic | ||
93 | #endif | ||
94 | |||
95 | /* include the reset of the code which will do the work */ | ||
96 | |||
97 | #include <asm/plat-s3c/debug-macro.S> | ||