From patchwork Mon Nov 25 13:39:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jonghwan Choi X-Patchwork-Id: 3230941 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CC20EC045B for ; Mon, 25 Nov 2013 13:39:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A97420219 for ; Mon, 25 Nov 2013 13:39:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E21120218 for ; Mon, 25 Nov 2013 13:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753871Ab3KYNjh (ORCPT ); Mon, 25 Nov 2013 08:39:37 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:42687 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976Ab3KYNjg (ORCPT ); Mon, 25 Nov 2013 08:39:36 -0500 Received: by mail-pb0-f43.google.com with SMTP id rq2so5719919pbb.16 for ; Mon, 25 Nov 2013 05:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=B2RYB077/jdBNL8jPirBdly+7NQmcOdwf4c2Ewww8TI=; b=lGcjOzhqDLbIGiE59sUho4XLs+JKFMsT4bXwINuanbpGxZgw72wRveGzeTzLOaOuca mITl7faP9MzwHtxUdPS+hSwlzzavZpn4fVAHJoq1/NVrkoG/jQa2pIafZrY25axlp+tY Cnlk0ntTVAJQbr+CTKA+MtLROfl5rOf12CsOhwX0NmYG8vFXY+ge3BtecGEqMFu7ogaX 58/g+wAZK/Cz2GSa3734KG5aqeDKbTDLW5tXyefX3rznMIcawfXFPBxYd9zNCtR0ABMD r7LnY4PXlvLRyEFecCAkPKbzm8XvDYHDMdBPSXrFTz1p0r8HTNVWL5wfL//VdDZkt1ou eGBw== X-Received: by 10.66.141.165 with SMTP id rp5mr27810065pab.90.1385386776037; Mon, 25 Nov 2013 05:39:36 -0800 (PST) Received: from localhost.localdomain ([182.221.197.188]) by mx.google.com with ESMTPSA id ki1sm73417777pbd.1.2013.11.25.05.39.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 05:39:35 -0800 (PST) From: Jonghwan Choi To: "Rafael J. Wysocki" , Viresh Kumar , Kukjin Kim Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jonghwan Choi Subject: [PATCH 2/2] cpufreq: exynos: Frequency lock should be considered in hibernation also. Date: Mon, 25 Nov 2013 22:39:30 +0900 Message-Id: <1385386770-4118-1-git-send-email-jhbird.choi@samsung.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY 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 Frequency lock value should be higher or same than the booting frequency, which is set by the bootloader. To eliminate possible inconsistency in frequency, we save and restore frequency during suspend & resume and disable CPUFREQ activity. This should be considered in hibernation also. Signed-off-by: Jonghwan Choi --- drivers/cpufreq/exynos-cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index f3c2287..cd05b0a 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -187,6 +187,7 @@ static int exynos_cpufreq_pm_notifier(struct notifier_block *notifier, int ret; switch (pm_event) { + case PM_HIBERNATION_PREPARE: case PM_SUSPEND_PREPARE: mutex_lock(&cpufreq_lock); frequency_locked = true; @@ -198,6 +199,8 @@ static int exynos_cpufreq_pm_notifier(struct notifier_block *notifier, break; + case PM_POST_HIBERNATION: + case PM_POST_RESTORE: case PM_POST_SUSPEND: mutex_lock(&cpufreq_lock); frequency_locked = false;