linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: rockchip: decrease the wait time for resume
@ 2015-02-09 13:12 Chris Zhong
  2015-02-09 13:12 ` [PATCH 2/2] ARM: rockchip: disable watchdog during suspend Chris Zhong
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Chris Zhong @ 2015-02-09 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

The delay time for wait the 24MHz OSC stabilization is 750ms, and the
delay time for wait the external PMU stabilization is 750ms too, let's
decrease them to 30ms.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---

 arch/arm/mach-rockchip/pm.c | 3 +++
 arch/arm/mach-rockchip/pm.h | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index 50cb781..a3ab397 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -209,6 +209,9 @@ static int rk3288_suspend_init(struct device_node *np)
 	memcpy(rk3288_bootram_base, rockchip_slp_cpu_resume,
 	       rk3288_bootram_sz);
 
+	regmap_write(pmu_regmap, RK3288_PMU_OSC_CNT, OSC_STABL_CNT_THRESH);
+	regmap_write(pmu_regmap, RK3288_PMU_STABL_CNT, PMU_STABL_CNT_THRESH);
+
 	return 0;
 }
 
diff --git a/arch/arm/mach-rockchip/pm.h b/arch/arm/mach-rockchip/pm.h
index 7d752ff..96beaa0 100644
--- a/arch/arm/mach-rockchip/pm.h
+++ b/arch/arm/mach-rockchip/pm.h
@@ -57,6 +57,10 @@ void __init rockchip_suspend_init(void);
 /* PMU_WAKEUP_CFG1 bits */
 #define PMU_ARMINT_WAKEUP_EN		BIT(0)
 
+/* wait 30ms for OSC stable and 30ms for pmic stable */
+#define OSC_STABL_CNT_THRESH	(32 * 30)
+#define PMU_STABL_CNT_THRESH	(32 * 30)
+
 enum rk3288_pwr_mode_con {
 	PMU_PWR_MODE_EN = 0,
 	PMU_CLK_CORE_SRC_GATE_EN,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-11 21:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 13:12 [PATCH 1/2] ARM: rockchip: decrease the wait time for resume Chris Zhong
2015-02-09 13:12 ` [PATCH 2/2] ARM: rockchip: disable watchdog during suspend Chris Zhong
2015-03-02 20:50   ` Heiko Stuebner
2015-03-03  5:57     ` Chris Zhong
2015-03-11 21:23       ` Doug Anderson
2015-03-11 21:43         ` Heiko Stuebner
2015-03-02 20:47 ` [PATCH 1/2] ARM: rockchip: decrease the wait time for resume Heiko Stuebner
2015-03-03  5:45   ` Chris Zhong
2015-03-11 21:31 ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).