From patchwork Mon Feb 9 13:12:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 5801221 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 20C799F30C for ; Mon, 9 Feb 2015 13:13:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4BEA92010E for ; Mon, 9 Feb 2015 13:13:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5709F20109 for ; Mon, 9 Feb 2015 13:13:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YKo95-0001tS-Ko; Mon, 09 Feb 2015 13:12:59 +0000 Received: from mail-oi0-f48.google.com ([209.85.218.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YKo92-0001pO-TL; Mon, 09 Feb 2015 13:12:58 +0000 Received: by mail-oi0-f48.google.com with SMTP id a3so4038435oib.7; Mon, 09 Feb 2015 05:12:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=gcc32CZ+dryJ8Lb4Ca+TUMZ9oRv0/Iq+6oJm3K8nBaw=; b=fkBv5ROfVqgDbBQ+9MXFYKJ2I2ILKfqpO3cXKhTMioaheg/cDJos64IZykl5+StgFJ WLhfe40zaZ9dA03lc+NB64jPqEG1DExOBWA08QneRYu5uzKWi0I+ihT4vGR5SaXVcQ9M gF6L+tIaPftKtpCD7rHTZ/MFr2MukBZPIdoS2QUiVaUBPapnFn7M5VQWhAkcnbbVr9CK 4ljgff2yiHYJf04EO6ir+RIFlpH6TB8vTU22Ls6rF+Z4+RM1LrFfSxLX36OYcdJFe19v pPivUTbo2xq+uU6y6HxAlzX5WwO+oMzyskhAzWPd81+1wjo+ZZVxkRBXxmTk/pm+2/X1 u9LA== X-Received: by 10.182.65.97 with SMTP id w1mr11713719obs.73.1423487554125; Mon, 09 Feb 2015 05:12:34 -0800 (PST) Received: from localhost.localdomain ([192.255.70.18]) by mx.google.com with ESMTPSA id y2sm5217261oei.1.2015.02.09.05.12.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Feb 2015 05:12:32 -0800 (PST) From: Chris Zhong To: heiko@sntech.de, dianders@chromium.org, djkurtz@chromium.org, sonnyrao@chromium.org Subject: [PATCH 1/2] ARM: rockchip: decrease the wait time for resume Date: Mon, 9 Feb 2015 21:12:22 +0800 Message-Id: <1423487543-10593-1-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150209_051256_990055_ED8C5096 X-CRM114-Status: UNSURE ( 8.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.5 (+) Cc: Chris Zhong , linux-rockchip@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Doug Anderson Tested-by: Doug Anderson --- 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,