From patchwork Tue Apr 8 12:19:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27941 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2FE9A20553 for ; Tue, 8 Apr 2014 12:19:42 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hn18sf2728613igb.0 for ; Tue, 08 Apr 2014 05:19:41 -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=MC90T2kKhm9Zcsx7cbCW20s4pV+L7B/K+4Y2Qwnt4Jk=; b=krnTk3B6ufIhq3LumFu5yHaLqz8qLJms51+iAtu5M0vOuwl4UzilcEPGAaDhnRGxyG H0COJ67TDcHIaxeV5j98+ASj0BH6dTHe+fw60/pM581ZcsG6qELqEitpBlKlip9Mn4t5 FolKOj8rMkDInEesOJxCPqWXbEiZEjM60NsZBtRO7ZohVYnFdKgdgjAatTCics3gP0UC ai0/u1CtvZniV+f8HKxG0VWd/rhaO3ySfUC1eXA7uXuwK9nxNctGflCgLZQKobovMuf9 TNSX1K4DkuYkr97F94FcWJzeda6vqai4nP3mcr0kb3YIhekmBrN6G/g3Mu48ANlRY+1/ kC2g== X-Gm-Message-State: ALoCoQm7pcg87DDchvfIqAjoxTwmsDzD60Dq7c5J3E9EvDXD3ym6hX87J0kMTluzeN1gUMubb2Or X-Received: by 10.50.62.106 with SMTP id x10mr2128249igr.2.1396959581650; Tue, 08 Apr 2014 05:19:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.170 with SMTP id l39ls179048qgd.6.gmail; Tue, 08 Apr 2014 05:19:41 -0700 (PDT) X-Received: by 10.59.9.38 with SMTP id dp6mr1433899ved.24.1396959581437; Tue, 08 Apr 2014 05:19:41 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id t1si357694vcj.94.2014.04.08.05.19.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so652645veb.20 for ; Tue, 08 Apr 2014 05:19:41 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr2987417vcm.11.1396959581287; Tue, 08 Apr 2014 05:19:41 -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 v8csp240626vcv; Tue, 8 Apr 2014 05:19:40 -0700 (PDT) X-Received: by 10.68.237.228 with SMTP id vf4mr4097823pbc.131.1396959580489; Tue, 08 Apr 2014 05:19:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tx1si993786pbc.150.2014.04.08.05.19.39; Tue, 08 Apr 2014 05:19:39 -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 S1756533AbaDHMTi (ORCPT + 9 others); Tue, 8 Apr 2014 08:19:38 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:53895 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756627AbaDHMTe (ORCPT ); Tue, 8 Apr 2014 08:19:34 -0400 Received: by mail-wi0-f176.google.com with SMTP id r20so6908172wiv.3 for ; Tue, 08 Apr 2014 05:19:33 -0700 (PDT) X-Received: by 10.194.77.50 with SMTP id p18mr2166069wjw.68.1396959573124; Tue, 08 Apr 2014 05:19:33 -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 u1sm3000063wjx.16.2014.04.08.05.19.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:32 -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 V3 05/17] ARM: exynos: cpuidle: Move some code inside the idle_finisher Date: Tue, 8 Apr 2014 14:19:27 +0200 Message-Id: <1396959579-18268-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396959579-18268-1-git-send-email-daniel.lezcano@linaro.org> References: <1396959579-18268-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.128.175 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. The call order changed but hat doesn't have a side effect because they are independent. The important call is cpu_do_idle() which must be done the last. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz --- 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 16e3325..cdfb1ae 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -87,7 +87,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; } @@ -97,14 +106,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(exynos_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 */