From patchwork Fri Apr 4 07:47:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 3936861 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 B9219BFF02 for ; Fri, 4 Apr 2014 07:48:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF5B6203E1 for ; Fri, 4 Apr 2014 07:48:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C59E203DC for ; Fri, 4 Apr 2014 07:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752151AbaDDHsC (ORCPT ); Fri, 4 Apr 2014 03:48:02 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:59969 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbaDDHsB (ORCPT ); Fri, 4 Apr 2014 03:48:01 -0400 Received: by mail-wi0-f171.google.com with SMTP id q5so682178wiv.10 for ; Fri, 04 Apr 2014 00:48:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y6hkU3jIiCdcJgBYfi39pLJ8N/3RVIzQMXAhKObVeo0=; b=lIF9uiCWL1hbLbK41AzIW9OIfgPLpEb4F+qwUvT5A8Uda2GyST10IGFQhcuyy01SKN qMcqk9QFLH3CCkBSt6/9EsKev9FxfRMaMXJFmvpluMWFbY4j1fGJxRYeuBT7gTxXSxqi ++iHTy/u66BtEfF0ZyMbHsFJaD3B3bLnMNEJhtewzeNhqiEUIh+ZyleoPipHUSHkFsHo aoN7fwKWUD/vIIUeVpdA6NslVNRhNUr25w24QZOklJ1WHp/XWx9RkZgvLLH+gpBP17dL 90As9fBbb552TuPRglSV2X/vURsLpuYFsYsVHruGVBExMBQQRWv8BmP1n7uxp7qerS6a HIlQ== X-Gm-Message-State: ALoCoQmuNCygJFYNmkD8JyXPZT5FX5LHVP6MwbNj8SidyiRoqnYvX3TL3jHW6Alsqp6WJH1iPtXi X-Received: by 10.180.12.147 with SMTP id y19mr2141323wib.39.1396597680630; Fri, 04 Apr 2014 00:48:00 -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 t1sm3028163wia.1.2014.04.04.00.47.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:48:00 -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 10/17] ARM: exynos: cpuidle: Move exynos_set_wakeupmask in the cpu_pm notifier Date: Fri, 4 Apr 2014 09:47:56 +0200 Message-Id: <1396597683-6969-11-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396597683-6969-1-git-send-email-daniel.lezcano@linaro.org> References: <1396597683-6969-1-git-send-email-daniel.lezcano@linaro.org> 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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 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 --- 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 c63ad05..7014654 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -59,15 +59,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 c0d8640..3f2ddef 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -374,12 +374,19 @@ early_wakeup: return; } +/* 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) { switch (cmd) { case CPU_PM_ENTER: exynos_cpu_save_register(); + exynos_set_wakeupmask(); break; case CPU_PM_EXIT: