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: 3961361 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 B6F1ABFF02 for ; Thu, 10 Apr 2014 09:56:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E17B220629 for ; Thu, 10 Apr 2014 09:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28A9C20636 for ; Thu, 10 Apr 2014 09:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965699AbaDJJ4D (ORCPT ); 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-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=Ma6e+F3AViTqW8prsVkklYxBCBItT7CZJDdM3xy0wvk=; b=KRE7lZtk3h9kNdZO45EvKxxlpWqB6L/pD19iEVhD3LY9EkOH5/XfR3blEANN4pXYvq vNQ0AsHqv+29+Oee7WmUv2VmKdh+11GS3PpdU5J6wuOaROyvxw3HFji14Po6IB/egLPd qoeB5jKYtOVYxWYfp/zbAnqkayXeiH4sEUx/aWvOwlZA+g4Wco/cG7ax/Gn0wCT3Rs48 DkS8YdrFBUgkOkXmBaRMcc7K9Mgyqsw2hle8Ru7MvIVoxqoHsdgixX82ekggu7UOPcY4 fGcMVWkS8nHSLaCCNntVYcz4Nynr2jvpyrZ2urM4y0/4euRyTb0kRwI0dBiZHO05bu50 Crbg== X-Gm-Message-State: ALoCoQksZEiNwEz3USTvQ0DQLiexEhJz+izQlwTkIKpJ3DCE5rYKKXPyvdJv75sS7Cs0rZSlrGxQ 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: 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 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;