diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-05-24 19:42:52 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-07-05 17:17:30 +0100 |
commit | 2e93d1ec080e4b21a34869129bda73f24ebb8950 (patch) | |
tree | 7fff306e4dd252c60f0145c951cc4c46c9024252 /arch/mips/alchemy/common/power.c | |
parent | c9f84873c1231621508cd438bb2991ddba770a69 (diff) |
MIPS: Alchemy: sleepcode without compile-time cputype dependencies
Split the low-level sleepcode into per-cpu functions instead of
relying on compile-time-defined cpu type.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1281/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/common/power.c')
-rw-r--r-- | arch/mips/alchemy/common/power.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/mips/alchemy/common/power.c b/arch/mips/alchemy/common/power.c index 14eb8c492da..5ef06a164a8 100644 --- a/arch/mips/alchemy/common/power.c +++ b/arch/mips/alchemy/common/power.c @@ -193,9 +193,15 @@ static void restore_core_regs(void) void au_sleep(void) { - save_core_regs(); - au1xxx_save_and_sleep(); - restore_core_regs(); + int cpuid = alchemy_get_cputype(); + if (cpuid != ALCHEMY_CPU_UNKNOWN) { + save_core_regs(); + if (cpuid <= ALCHEMY_CPU_AU1500) + alchemy_sleep_au1000(); + else if (cpuid <= ALCHEMY_CPU_AU1200) + alchemy_sleep_au1550(); + restore_core_regs(); + } } #endif /* CONFIG_PM */ |