From patchwork Thu Apr 10 09:55:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 28144 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CAA4020671 for ; Thu, 10 Apr 2014 09:56:06 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id i17sf10392014qcy.11 for ; Thu, 10 Apr 2014 02:56:06 -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=77NLgMq7psCjqgLnUWHXWp0GegRqIOL22o4CleBndQY=; b=fvplFF3doiqPHQ+NP4HvvEgY8NWw0EhQBghK3dpG4dQfM993dmr14KXGB0tvyH2zg/ MbnFCW8+3FRvWLNjtj/dSBtOCRHkgftDXjX8OC7EFYB5Mj66HOxOFxkkmAcEVoFMBVq8 5avTFQiIbIZQvZiy7ew0JSxh7exac1Xa8dtruXZRICYNa4x0OPTNlix36g3ZUHReQ3GT UwACZH4934IKkyDwwD7MGuvsnOCJci8QiCITj8l6IWuh9kHpYRHFipGtbIgRDqSkOzmx t0XqbFzbljTu4HxEPdseVM1DBHWeWS1nHzQCgNY0U+a0ENZIR8IWzxqRBhAvLmIS6fMq VtfA== X-Gm-Message-State: ALoCoQnJno4NeRi0MSyFj/GjVHVk4D8CyKfvAB7uJQIS9hgNcNbWv6rMs0Y9v2pKcJinA7f4CWzz X-Received: by 10.58.43.170 with SMTP id x10mr7351360vel.36.1397123766646; Thu, 10 Apr 2014 02:56:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls1016806qgd.91.gmail; Thu, 10 Apr 2014 02:56:06 -0700 (PDT) X-Received: by 10.52.240.207 with SMTP id wc15mr11651489vdc.14.1397123766517; Thu, 10 Apr 2014 02:56:06 -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 dx8si603712ved.198.2014.04.10.02.56.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:56:06 -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 ib6so3284169vcb.27 for ; Thu, 10 Apr 2014 02:56:06 -0700 (PDT) X-Received: by 10.52.128.231 with SMTP id nr7mr11472071vdb.17.1397123766436; Thu, 10 Apr 2014 02:56:06 -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.221.72 with SMTP id ib8csp45043vcb; Thu, 10 Apr 2014 02:56:06 -0700 (PDT) X-Received: by 10.68.195.104 with SMTP id id8mr18549877pbc.102.1397123765692; Thu, 10 Apr 2014 02:56:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xe4si1873677pbc.456.2014.04.10.02.56.05; Thu, 10 Apr 2014 02:56:05 -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 S965699AbaDJJ4D (ORCPT + 9 others); Thu, 10 Apr 2014 05:56:03 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:43863 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965660AbaDJJzy (ORCPT ); Thu, 10 Apr 2014 05:55:54 -0400 Received: by mail-we0-f169.google.com with SMTP id w62so3747300wes.28 for ; Thu, 10 Apr 2014 02:55:53 -0700 (PDT) X-Received: by 10.194.242.231 with SMTP id wt7mr1561351wjc.52.1397123753047; Thu, 10 Apr 2014 02:55:53 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-377-242.w86-199.abo.wanadoo.fr. [86.199.232.242]) by mx.google.com with ESMTPSA id hu7sm15690125wib.10.2014.04.10.02.55.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:55:52 -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, b.zolnierkie@samsung.com, sachin.kamat@linaro.org, viresh.kumar@linaro.org, rjw@rjwysocki.net Subject: [PATCH V4 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function Date: Thu, 10 Apr 2014 11:55:45 +0200 Message-Id: <1397123751-1957-15-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397123751-1957-1-git-send-email-daniel.lezcano@linaro.org> References: <1397123751-1957-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 the AFTR state specific call into a single function. Signed-off-by: Daniel Lezcano --- arch/arm/mach-exynos/cpuidle.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index d7091e0..0d3c839 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -51,13 +51,17 @@ static void exynos_cpu_set_boot_vector(long flags) __raw_writel(flags, REG_DIRECTGO_FLAG); } -static int idle_finisher(unsigned long flags) +static void exynos_enter_aftr(void) { exynos_set_wakeupmask(0x0000ff3e); exynos_cpu_set_boot_vector(S5P_CHECK_AFTR); /* Set value of power down register for aftr mode */ exynos_sys_powerdown_conf(SYS_AFTR); +} +static int idle_finisher(unsigned long flags) +{ + exynos_enter_aftr(); cpu_do_idle(); return 1;