]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Alchemy: Include Au1100 in PM code.
authorManuel Lauss <manuel.lauss@googlemail.com>
Tue, 2 Aug 2011 13:50:58 +0000 (15:50 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 17 Sep 2011 00:45:11 +0000 (02:45 +0200)
The current code forgets the Au1100 when looking for the correct method to
suspend the chip.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2675/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/common/power.c

index ce44fe9b4a4b28bc38a15a511ac5a0076b10cb1b..bdd6651e9a4f3d4f0f7fc59f5f38be6e79b1a738 100644 (file)
@@ -114,13 +114,19 @@ static void restore_core_regs(void)
 
 void au_sleep(void)
 {
-       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();
+       save_core_regs();
+
+       switch (alchemy_get_cputype()) {
+       case ALCHEMY_CPU_AU1000:
+       case ALCHEMY_CPU_AU1500:
+       case ALCHEMY_CPU_AU1100:
+               alchemy_sleep_au1000();
+               break;
+       case ALCHEMY_CPU_AU1550:
+       case ALCHEMY_CPU_AU1200:
+               alchemy_sleep_au1550();
+               break;
        }
+
+       restore_core_regs();
 }