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: 27779 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1320720369 for ; Fri, 4 Apr 2014 07:48:05 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf9708683obc.9 for ; Fri, 04 Apr 2014 00:48:05 -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=blJF1HjvTFknNt0+iFKx9gDHdRg/3K/5gAgfLJSc9BM=; b=Tstti/cVtis9J3zFHWjGiQujmCUESwkf4BIezcr8z1Ec0+Tf6ujtpfZHpdVhDx60cO 3taF8rfhhv84YXCGLaMTpYk1RINzVbuv7XZI4zGsP/qiAliFkT2sppwvreX0fUTGtJto jr2NkDlFwLPIYCCV4VbSnxJZfPmEHWewRt3Xc9VvsM086uUnKyqdZRM6HLxWcADAhwLA fK31NE7yG6j6r3geZf/wrieUgqe6sdaP8OOFAJZ77x6OobM9P44uu3jRQnN2qint2xKJ Ct8bXclztOVymUd9gUzs0yXxB/+wHbE/1jdRM9LnRIn9UJGSVngqMG1HSgmVZLAmwlUx LU+w== X-Gm-Message-State: ALoCoQl0LYciUb97XUj0vPSVnUrSol3/lfn/5jj2qPOoTC0ZJ1e0NzRQ2TRZGkC9aGMRgA6X2Pt3 X-Received: by 10.42.107.146 with SMTP id d18mr5970474icp.8.1396597685605; Fri, 04 Apr 2014 00:48:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.137 with SMTP id u9ls937113qga.81.gmail; Fri, 04 Apr 2014 00:48:05 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr3743590vec.19.1396597685531; Fri, 04 Apr 2014 00:48:05 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id kp12si651313veb.120.2014.04.04.00.48.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:48:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ks9so2926339vcb.13 for ; Fri, 04 Apr 2014 00:48:05 -0700 (PDT) X-Received: by 10.58.187.9 with SMTP id fo9mr3761536vec.4.1396597685464; Fri, 04 Apr 2014 00:48:05 -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 v8csp92815vcv; Fri, 4 Apr 2014 00:48:05 -0700 (PDT) X-Received: by 10.68.237.133 with SMTP id vc5mr13310456pbc.92.1396597684829; Fri, 04 Apr 2014 00:48:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iw3si4270530pac.96.2014.04.04.00.48.04; Fri, 04 Apr 2014 00:48:04 -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 S1752151AbaDDHsC (ORCPT + 9 others); 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-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: 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.220.182 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 --- 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: