From patchwork Fri Apr 11 10:40:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 3967571 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE8769F336 for ; Fri, 11 Apr 2014 10:40:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BDCA207F7 for ; Fri, 11 Apr 2014 10:40:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47F5C207F3 for ; Fri, 11 Apr 2014 10:40:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934745AbaDKKkT (ORCPT ); Fri, 11 Apr 2014 06:40:19 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:38592 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934724AbaDKKkR (ORCPT ); Fri, 11 Apr 2014 06:40:17 -0400 Received: by mail-wg0-f49.google.com with SMTP id a1so5177433wgh.8 for ; Fri, 11 Apr 2014 03:40:15 -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=LIVUXmgsOflMkukae+ZZ4qii6pDjgKsJy2iDI7LjI0A=; b=FXiN/vkR/ajhxP46h+nuvvJyJBVXm2gkg0RjE5Pz1JXZwvrTKwiUC27HhJhND1bOsd fKgHyNDXr23HCvfVfnmY1er+NJLIzLrgt5V2Yf9o5oPqEO+0vqzD4DBbtKIK7L59cuW1 hhDDJ3s62AiRR8TWt4UQhaoiOYQmYvSUWlQYpDUSrDT9Sv9De9QkGk91UwrRnP9FH44B TfxH5BB1TVe6Rbm22IG9AKbaVwCw8vvHKK+zXpEGlpDWYSUIF9dtXSlU8yF02N/JXIRQ B9qoIN5f3W7BFvp4H413QWzhHwz7ZKNHI4XRSx3KasMzjULh3HEkq+A1C/c+fBzLKQWd ZiRA== X-Gm-Message-State: ALoCoQmstlRidP4ae6kaETh9U2tJsi3p2c2zAktWd7+LCpvczr9lnpIiWmZ9iXZVjNZmlWOtVsKB X-Received: by 10.194.236.232 with SMTP id ux8mr20092196wjc.46.1397212815814; Fri, 11 Apr 2014 03:40:15 -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 eq8sm3683033wib.16.2014.04.11.03.40.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:40:15 -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 V5 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function Date: Fri, 11 Apr 2014 12:40:09 +0200 Message-Id: <1397212815-16068-15-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> References: <1397212815-16068-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.3 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 95313ea..fe35fba 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;