diff options
Diffstat (limited to 'arch/mips/alchemy/common/power.c')
-rw-r--r-- | arch/mips/alchemy/common/power.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/mips/alchemy/common/power.c b/arch/mips/alchemy/common/power.c index 647e518c90bc..b86324a42601 100644 --- a/arch/mips/alchemy/common/power.c +++ b/arch/mips/alchemy/common/power.c | |||
@@ -158,15 +158,21 @@ static void restore_core_regs(void) | |||
158 | 158 | ||
159 | void au_sleep(void) | 159 | void au_sleep(void) |
160 | { | 160 | { |
161 | int cpuid = alchemy_get_cputype(); | 161 | save_core_regs(); |
162 | if (cpuid != ALCHEMY_CPU_UNKNOWN) { | 162 | |
163 | save_core_regs(); | 163 | switch (alchemy_get_cputype()) { |
164 | if (cpuid <= ALCHEMY_CPU_AU1500) | 164 | case ALCHEMY_CPU_AU1000: |
165 | alchemy_sleep_au1000(); | 165 | case ALCHEMY_CPU_AU1500: |
166 | else if (cpuid <= ALCHEMY_CPU_AU1200) | 166 | case ALCHEMY_CPU_AU1100: |
167 | alchemy_sleep_au1550(); | 167 | alchemy_sleep_au1000(); |
168 | restore_core_regs(); | 168 | break; |
169 | case ALCHEMY_CPU_AU1550: | ||
170 | case ALCHEMY_CPU_AU1200: | ||
171 | alchemy_sleep_au1550(); | ||
172 | break; | ||
169 | } | 173 | } |
174 | |||
175 | restore_core_regs(); | ||
170 | } | 176 | } |
171 | 177 | ||
172 | #endif /* CONFIG_PM */ | 178 | #endif /* CONFIG_PM */ |