From patchwork Fri Apr 4 13:43:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27827 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ABE3820369 for ; Fri, 4 Apr 2014 13:43:16 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf6384443veb.3 for ; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=+7m8ZUzeJd5L2KCk3+YX3tuu60/nCCp1lhbl556Hu6c=; b=CwnrTppiFp3InAnoCbwCd/lrfpOG597yRxVQIc8I260d7T+AXoKfJNyLf8kCs9wtd3 Ml7AFee097C2tSbO0a8Pcui1kHXLIb7R4VIUCYGb5ngWBpUWg3CTH27BKrCE6ulOV8Pf k/Rfw8fgvQEO/FyTXJ3bEXq2yB89pakO2FNivwlijCWggLpSTWJy5cQ16JahcRzXHi8j xIBpVQWjXQ8l+3lU5yWe7oU7eTWClcLvi7E6EjeS76ZYYLSjMWpY5T8dSgsvN55SPwo9 MhCgn9EuKmejFvecyyruVdNg3Ho4lwde6rUuMO6Kp1C77nXANqhIEbXf6PCY+Adj5LXj a6vA== X-Gm-Message-State: ALoCoQkefEXeueq/TF3CEFwFHqJZFe7xqY21XZiKTYezbC7iUiQlALIzUX/5Y3z9I8aAqPOiDrCm X-Received: by 10.236.132.239 with SMTP id o75mr7073055yhi.19.1396618996433; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.137 with SMTP id j9ls1051826qgd.70.gmail; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr8475849vcm.11.1396618996312; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id fn10si1784196vdc.81.2014.04.04.06.43.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so1459680veb.3 for ; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) X-Received: by 10.221.28.202 with SMTP id rv10mr8558505vcb.10.1396618996224; Fri, 04 Apr 2014 06:43:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp115342vcv; Fri, 4 Apr 2014 06:43:15 -0700 (PDT) X-Received: by 10.68.248.7 with SMTP id yi7mr15209459pbc.31.1396618993221; Fri, 04 Apr 2014 06:43:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk5si4616090pbc.252.2014.04.04.06.43.12; Fri, 04 Apr 2014 06:43:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbaDDNnM (ORCPT + 9 others); Fri, 4 Apr 2014 09:43:12 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:58712 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbaDDNnL (ORCPT ); Fri, 4 Apr 2014 09:43:11 -0400 Received: by mail-wi0-f173.google.com with SMTP id z2so1299010wiv.12 for ; Fri, 04 Apr 2014 06:43:10 -0700 (PDT) X-Received: by 10.180.188.66 with SMTP id fy2mr4654688wic.45.1396618989941; Fri, 04 Apr 2014 06:43:09 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-451-172.w83-205.abo.wanadoo.fr. [83.205.74.172]) by mx.google.com with ESMTPSA id cu6sm2845053wjb.8.2014.04.04.06.43.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:08 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, t.figa@samsung.com, linaro-kernel@lists.linaro.org, rjw@rjwysocki.net Subject: [PATCH V2 10/17] ARM: exynos: cpuidle: Move exynos_set_wakeupmask in the cpu_pm notifier Date: Fri, 4 Apr 2014 15:43:02 +0200 Message-Id: <1396618989-2897-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396618989-2897-1-git-send-email-daniel.lezcano@linaro.org> References: <1396618989-2897-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Let's encapsulate more the PM code inside the PM file by moving the 'exynos_set_wakeupmask' function inside the pm.c and the call in the cpu_pm notifier. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/cpuidle.c | 7 ------- arch/arm/mach-exynos/pm.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index ce31004..01444ed 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -58,15 +58,8 @@ #define PWR_CTRL2_CORE2_UP_RATIO (1 << 4) #define PWR_CTRL2_CORE1_UP_RATIO (1 << 0) -/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ -static void exynos_set_wakeupmask(void) -{ - __raw_writel(0x0000ff3e, S5P_WAKEUP_MASK); -} - static int idle_finisher(unsigned long flags) { - exynos_set_wakeupmask(); __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR); __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 9773a00..c8b3dc4 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -322,6 +322,12 @@ static const struct platform_suspend_ops exynos_suspend_ops = { .valid = suspend_valid_only_mem, }; +/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ +static void exynos_set_wakeupmask(void) +{ + __raw_writel(0x0000ff3e, S5P_WAKEUP_MASK); +} + static int exynos_cpu_pm_notifier(struct notifier_block *self, unsigned long cmd, void *v) { @@ -331,6 +337,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, case CPU_PM_ENTER: if (cpu == 0) { exynos_cpu_save_register(); + exynos_set_wakeupmask(); } break;