diff options
author | Pete Popov <ppopov@embeddedalley.com> | 2005-04-06 20:42:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:02 -0400 |
commit | 494900af689a22479eb405ff1323cad673bd9208 (patch) | |
tree | c4c50f2874f48679fd476a50e8866db2ce4696d3 /arch/mips/kernel/cpu-probe.c | |
parent | 3b495f2bb749b828499135743b9ddec46e34fda8 (diff) |
Remove CONFIG_PM dependency from au1x wait in cpu_probe.
Additional work necessary to completely remove that config option.
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 | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 66c2a2788ffe..b7c8346df3ca 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -51,29 +51,25 @@ static void r4k_wait(void) | |||
51 | ".set\tmips0"); | 51 | ".set\tmips0"); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* The Au1xxx wait is available only if using 32khz counter or |
55 | * The Au1xxx wait is available only if we run CONFIG_PM and | 55 | * external timer source, but specifically not CP0 Counter. */ |
56 | * the timer setup found we had a 32KHz counter available. | 56 | static void au1k_wait(void) |
57 | * There are still problems with functions that may call au1k_wait | ||
58 | * directly, but that will be discovered pretty quickly. | ||
59 | */ | ||
60 | extern void (*au1k_wait_ptr)(void); | ||
61 | |||
62 | void au1k_wait(void) | ||
63 | { | 57 | { |
64 | #ifdef CONFIG_PM | 58 | unsigned long addr; |
65 | /* using the wait instruction makes CP0 counter unusable */ | 59 | /* using the wait instruction makes CP0 counter unusable */ |
66 | __asm__(".set\tmips3\n\t" | 60 | __asm__("la %0,au1k_wait\n\t" |
61 | ".set mips3\n\t" | ||
62 | "cache 0x14,0(%0)\n\t" | ||
63 | "cache 0x14,32(%0)\n\t" | ||
64 | "sync\n\t" | ||
65 | "nop\n\t" | ||
67 | "wait\n\t" | 66 | "wait\n\t" |
68 | "nop\n\t" | 67 | "nop\n\t" |
69 | "nop\n\t" | 68 | "nop\n\t" |
70 | "nop\n\t" | 69 | "nop\n\t" |
71 | "nop\n\t" | 70 | "nop\n\t" |
72 | ".set\tmips0"); | 71 | ".set mips0\n\t" |
73 | #else | 72 | : : "r" (addr)); |
74 | __asm__("nop\n\t" | ||
75 | "nop"); | ||
76 | #endif | ||
77 | } | 73 | } |
78 | 74 | ||
79 | static inline void check_wait(void) | 75 | static inline void check_wait(void) |
@@ -112,21 +108,20 @@ static inline void check_wait(void) | |||
112 | cpu_wait = r4k_wait; | 108 | cpu_wait = r4k_wait; |
113 | printk(" available.\n"); | 109 | printk(" available.\n"); |
114 | break; | 110 | break; |
115 | #ifdef CONFIG_PM | ||
116 | case CPU_AU1000: | 111 | case CPU_AU1000: |
117 | case CPU_AU1100: | 112 | case CPU_AU1100: |
118 | case CPU_AU1500: | 113 | case CPU_AU1500: |
119 | case CPU_AU1550: | 114 | case CPU_AU1550: |
120 | case CPU_AU1200: | 115 | case CPU_AU1200: |
121 | if (au1k_wait_ptr != NULL) { | 116 | { |
122 | cpu_wait = au1k_wait_ptr; | 117 | extern int allow_au1k_wait; /* au1000/common/time.c */ |
123 | printk(" available.\n"); | 118 | if (allow_au1k_wait) { |
124 | } | 119 | cpu_wait = au1k_wait; |
125 | else { | 120 | printk(" available.\n"); |
126 | printk(" unavailable.\n"); | 121 | } else |
122 | printk(" unavailable.\n"); | ||
127 | } | 123 | } |
128 | break; | 124 | break; |
129 | #endif | ||
130 | default: | 125 | default: |
131 | printk(" unavailable.\n"); | 126 | printk(" unavailable.\n"); |
132 | break; | 127 | break; |