diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-12-21 03:26:23 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-11 04:57:27 -0500 |
commit | 0c694de12b54fa96b9555e07603f567906ce21c8 (patch) | |
tree | c7528273c1d86069cb6e83bd2b36706f663f1eb2 /arch/mips/kernel/cpu-probe.c | |
parent | 779e7d41ad004946603da139da99ba775f74cb1c (diff) |
MIPS: Alchemy: RTC counter clocksource / clockevent support.
Add support for the 32 kHz counter1 (RTC) as clocksource / clockevent
device. As a nice side effect, this also enables use of the 'wait'
instruction for runtime idle power savings.
If the counters aren't enabled/working properly, fall back on the
cp0 counter clock code.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 6b3c63dd1818..a7162a4484cf 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -96,6 +96,9 @@ int allow_au1k_wait; | |||
96 | 96 | ||
97 | static void au1k_wait(void) | 97 | static void au1k_wait(void) |
98 | { | 98 | { |
99 | if (!allow_au1k_wait) | ||
100 | return; | ||
101 | |||
99 | /* using the wait instruction makes CP0 counter unusable */ | 102 | /* using the wait instruction makes CP0 counter unusable */ |
100 | __asm__(" .set mips3 \n" | 103 | __asm__(" .set mips3 \n" |
101 | " cache 0x14, 0(%0) \n" | 104 | " cache 0x14, 0(%0) \n" |
@@ -186,8 +189,7 @@ void __init check_wait(void) | |||
186 | case CPU_AU1200: | 189 | case CPU_AU1200: |
187 | case CPU_AU1210: | 190 | case CPU_AU1210: |
188 | case CPU_AU1250: | 191 | case CPU_AU1250: |
189 | if (allow_au1k_wait) | 192 | cpu_wait = au1k_wait; |
190 | cpu_wait = au1k_wait; | ||
191 | break; | 193 | break; |
192 | case CPU_20KC: | 194 | case CPU_20KC: |
193 | /* | 195 | /* |