From patchwork Fri Apr 4 07:47:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27774 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F064D2054B for ; Fri, 4 Apr 2014 07:47:58 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id lh14sf7942166vcb.10 for ; Fri, 04 Apr 2014 00:47:58 -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=cgOkHc1MMEH5/5Ec3SnLaE5tkpIuoAyWKOoPB4nZOH0=; b=GNvXE1wwvLDl9KBJ2ivvrwzg37LLgQYdMApjFS0pIe/4pAURhs5wBtBS7n5ZV6d8Cc FIB1I+TDLo7Wd9JI7lc7EF9TUqjA0vPceAEVSEkyYTUTfpjDVkudGqJaVWJg2YVTQtI8 NXBO8Uesx1mzEz4cfgn1rtNQ88nUWZV2BjM+cWZqCHrS/OVAZtKRUycpdsc0tZnVv1No p+tLTQINyF0o8uJokrp1rL7TzavtcpVUGDw3Z4s6x5FETnzkdvioFqUzvSK+q6gi/RLO Q2zoVpJzlwHTw3LTxvk9eqKwJGrKVTZ9SuZYi+40zNN6Kyi6g05qS8qCEYv+pX6xhTvn WP8A== X-Gm-Message-State: ALoCoQmtYe63CTIsnsMeBT+Jw3uiLDo+rDF1z3ynH8/q2K84g6uymLBIL/99A5gNpEaLOFpHmIwN X-Received: by 10.58.178.81 with SMTP id cw17mr2554606vec.37.1396597678687; Fri, 04 Apr 2014 00:47:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.40 with SMTP id 37ls941924qgk.32.gmail; Fri, 04 Apr 2014 00:47:58 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr10089714vdb.18.1396597678625; Fri, 04 Apr 2014 00:47:58 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id tz5si1653148vdc.187.2014.04.04.00.47.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:47:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so2842507vcb.2 for ; Fri, 04 Apr 2014 00:47:58 -0700 (PDT) X-Received: by 10.221.28.202 with SMTP id rv10mr7184503vcb.10.1396597678556; Fri, 04 Apr 2014 00:47:58 -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 v8csp92801vcv; Fri, 4 Apr 2014 00:47:58 -0700 (PDT) X-Received: by 10.68.93.3 with SMTP id cq3mr13146966pbb.145.1396597677661; Fri, 04 Apr 2014 00:47:57 -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.47.57; Fri, 04 Apr 2014 00:47:57 -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 S1752107AbaDDHr4 (ORCPT + 9 others); Fri, 4 Apr 2014 03:47:56 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:53480 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750755AbaDDHrz (ORCPT ); Fri, 4 Apr 2014 03:47:55 -0400 Received: by mail-wg0-f42.google.com with SMTP id y10so2990953wgg.25 for ; Fri, 04 Apr 2014 00:47:54 -0700 (PDT) X-Received: by 10.180.9.42 with SMTP id w10mr2289432wia.20.1396597674083; Fri, 04 Apr 2014 00:47:54 -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.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:47:53 -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 05/17] ARM: exynos: cpuidle: Move some code inside the idle_finisher Date: Fri, 4 Apr 2014 09:47:51 +0200 Message-Id: <1396597683-6969-6-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.171 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: , Move the code around to differentiate different section of code and prepare it to be factored out in the next patches. Signed-off-by: Daniel Lezcano --- arch/arm/mach-exynos/cpuidle.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 18f6aba..9cd1ed9 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -88,7 +88,16 @@ static void restore_cpu_arch_register(void) 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); + + /* Set value of power down register for aftr mode */ + exynos_sys_powerdown_conf(SYS_AFTR); + cpu_do_idle(); + return 1; } @@ -98,14 +107,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev, { unsigned long tmp; - exynos_set_wakeupmask(); - - /* Set value of power down register for aftr mode */ - exynos_sys_powerdown_conf(SYS_AFTR); - - __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR); - __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); - save_cpu_arch_register(); /* Setting Central Sequence Register for power down mode */