Skip to contentSkip to conversation

Lemote-2F: Suspend CS5536 MFGPT Timer

PATCH In review Wu Zhangjin 2 participants 2 messages Nov 24, 2009 – Nov 27, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Lemote-2F: Suspend CS5536 MFGPT Timer

From: Wu Zhangjin <[email protected]>

Before putting loongson2f into wait mode, suspend the MFGPT Timer, and after wake-up, resume it. This may save some power.

---
 arch/mips/loongson/lemote-2f/pm.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
arch/mips/loongson/lemote-2f/pm.c +11 -0
index 81c0641..d7af2e6 100644
@@ -22,6 +22,7 @@
 
 #include <loongson.h>
 
+#include <cs5536/cs5536_mfgpt.h>
 #include "ec_kb3310b.h"
 
 #define I8042_KBD_IRQ		1
@@ -136,3 +137,13 @@ int wakeup_loongson(void)
 
 	return 0;
 }
+
+void __weak mach_suspend(void)
+{
+	disable_mfgpt0_counter();
+}
+
+void __weak mach_resume(void)
+{
+	enable_mfgpt0_counter();
+}
Signature · 1 line
1.6.2.1
#1 lore raw
Quoted 4 lines · Wu Zhangjin

From: Wu Zhangjin <[email protected]>

Before putting loongson2f into wait mode, suspend the MFGPT Timer, and after wake-up, resume it. This may save some power.

Thanks, queued for 2.6.33.

Ralf