* [PATCH] [loongson] Lemote-2F: Suspend CS5536 MFGPT Timer
@ 2009-11-24 13:48 Wu Zhangjin
2009-11-27 14:42 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Wu Zhangjin @ 2009-11-24 13:48 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Wu Zhangjin
From: Wu Zhangjin <wuzhangjin@gmail.com>
Before putting loongson2f into wait mode, suspend the MFGPT Timer, and
after wake-up, resume it. This may save some power.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
arch/mips/loongson/lemote-2f/pm.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/mips/loongson/lemote-2f/pm.c b/arch/mips/loongson/lemote-2f/pm.c
index 81c0641..d7af2e6 100644
--- a/arch/mips/loongson/lemote-2f/pm.c
+++ b/arch/mips/loongson/lemote-2f/pm.c
@@ -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();
+}
--
1.6.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [loongson] Lemote-2F: Suspend CS5536 MFGPT Timer
2009-11-24 13:48 [PATCH] [loongson] Lemote-2F: Suspend CS5536 MFGPT Timer Wu Zhangjin
@ 2009-11-27 14:42 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-11-27 14:42 UTC (permalink / raw)
To: Wu Zhangjin; +Cc: linux-mips
On Tue, Nov 24, 2009 at 09:48:36PM +0800, Wu Zhangjin wrote:
> From: Wu Zhangjin <wuzhangjin@gmail.com>
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-27 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-24 13:48 [PATCH] [loongson] Lemote-2F: Suspend CS5536 MFGPT Timer Wu Zhangjin
2009-11-27 14:42 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.