From patchwork Fri Apr 4 13:42:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27822 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E2FA20369 for ; Fri, 4 Apr 2014 13:43:06 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lg15sf9312331vcb.7 for ; Fri, 04 Apr 2014 06:43: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=tiKJujIvVExTNejOYmAc+36hgBhHabYrEgpk6YmvbO8=; b=h1nAKrVwnwNHQP+n44o64uQclhyTINlktqof1QBCenkow23o27MwXGFQaHVB4mNTx3 zdwM435sSNNdCRBebwAqsshdn+Y8j45pLXUmElGBm8m2x/F8Je5JtHS/xMhuf9XQm+bD 6yu8/CSHP7LLVXgfDmm0UcBb++Y2Jw85VUUIsDaisOg+J8nGnwOKm3ZApDSauwRDJcg/ gPI/Qpog83QCW0ub7WeOeXdrfIwOoUqN+vKjJNbRM55bb0TqlYZ/qohlaqwPYWHj03zu 0rJSP3etWbl9MkVeyKpY7PjFWqL+dm/tNkv1orm1Q+RRMBhz0SkxmKXewwDRi0ihSzr/ q2Dg== X-Gm-Message-State: ALoCoQnYLuevO6R2vTzsST0yfDRTWGZJ9tyFtAIhUb3t5ksJdr4wsHxeZED4i2PMCExlE3I88RvY X-Received: by 10.236.69.74 with SMTP id m50mr7283886yhd.0.1396618986072; Fri, 04 Apr 2014 06:43:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.68 with SMTP id n62ls1043978qge.28.gmail; Fri, 04 Apr 2014 06:43:06 -0700 (PDT) X-Received: by 10.220.249.6 with SMTP id mi6mr147572vcb.33.1396618985946; Fri, 04 Apr 2014 06:43:05 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id sw4si834005vdc.48.2014.04.04.06.43.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id la4so3181788vcb.3 for ; Fri, 04 Apr 2014 06:43:05 -0700 (PDT) X-Received: by 10.53.11.37 with SMTP id ef5mr96657vdd.62.1396618985830; Fri, 04 Apr 2014 06:43:05 -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 v8csp115321vcv; Fri, 4 Apr 2014 06:43:05 -0700 (PDT) X-Received: by 10.67.4.169 with SMTP id cf9mr14994484pad.45.1396618984846; Fri, 04 Apr 2014 06:43:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk5si4616090pbc.252.2014.04.04.06.43.04; Fri, 04 Apr 2014 06:43:04 -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 S1752780AbaDDNnD (ORCPT + 9 others); Fri, 4 Apr 2014 09:43:03 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:55270 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384AbaDDNnC (ORCPT ); Fri, 4 Apr 2014 09:43:02 -0400 Received: by mail-wg0-f45.google.com with SMTP id l18so3446119wgh.28 for ; Fri, 04 Apr 2014 06:43:01 -0700 (PDT) X-Received: by 10.180.96.225 with SMTP id dv1mr4669127wib.37.1396618981158; Fri, 04 Apr 2014 06:43:01 -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 cu6sm2845053wjb.8.2014.04.04.06.42.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:00 -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 V2 05/17] ARM: exynos: cpuidle: Move some code inside the idle_finisher Date: Fri, 4 Apr 2014 15:42:57 +0200 Message-Id: <1396618989-2897-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396618989-2897-1-git-send-email-daniel.lezcano@linaro.org> References: <1396618989-2897-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.172 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 */