From patchwork Thu Apr 10 09:55:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 28137 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A3E220671 for ; Thu, 10 Apr 2014 09:55:57 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf10389729qcx.5 for ; Thu, 10 Apr 2014 02:55:57 -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=KQnPR0DVJjhinwggBfMd+v/ZkhTrpD5kXtyw2YtnlAk=; b=AU+DP7dV4FptSqO+4WMOtxYiOyHi5sLBXbrboDo7Qn21TUH/lU7EUTxZbJ9zoDmPz2 PPtEyoSInmv6nvkknjdX74YhHuiCAu3EF2i8pcymczETshOm9854cf1jF9hSWpng4+JE +nWAuz/muWnpigt7fsKA/lDLFxbhciJdSAF1KiOb9STCGVF8bLN8QwPofevBgvKhcLfW LdLHxhumcJxjFPVpkqEOi+XfeBy+G7wV8tK1emCx1CnV2vLouAcGeHn1+tdt6SczW5Jt ijOxPnCeLjGPtxk43CP92JRs0+abOp7JnQB/6zJNrB9qUowy/bzjJau3CKq9WDHRchEo Owgg== X-Gm-Message-State: ALoCoQnHvmkfEanMHSCQi+rtvG2CAI/EKXyCFfJIyX2LAaPhMeuRbJPqBKk+frAMfsg4le7BiOkH X-Received: by 10.236.69.74 with SMTP id m50mr6969650yhd.0.1397123757227; Thu, 10 Apr 2014 02:55:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.232 with SMTP id 95ls1046541qgp.68.gmail; Thu, 10 Apr 2014 02:55:57 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr13682369vcm.11.1397123757110; Thu, 10 Apr 2014 02:55:57 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id de9si606874vcb.105.2014.04.10.02.55.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:55:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id im17so3143046vcb.37 for ; Thu, 10 Apr 2014 02:55:57 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr13611667vcb.2.1397123757034; Thu, 10 Apr 2014 02:55:57 -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.221.72 with SMTP id ib8csp45027vcb; Thu, 10 Apr 2014 02:55:56 -0700 (PDT) X-Received: by 10.68.138.227 with SMTP id qt3mr18687385pbb.6.1397123755480; Thu, 10 Apr 2014 02:55:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xe4si1873677pbc.456.2014.04.10.02.55.54; Thu, 10 Apr 2014 02:55:54 -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 S965638AbaDJJzu (ORCPT + 9 others); Thu, 10 Apr 2014 05:55:50 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:45408 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965608AbaDJJzl (ORCPT ); Thu, 10 Apr 2014 05:55:41 -0400 Received: by mail-we0-f173.google.com with SMTP id w61so3753175wes.32 for ; Thu, 10 Apr 2014 02:55:40 -0700 (PDT) X-Received: by 10.180.94.37 with SMTP id cz5mr41924615wib.19.1397123739952; Thu, 10 Apr 2014 02:55:39 -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.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:55:39 -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 05/20] ARM: exynos: cpuidle: Move some code inside the idle_finisher Date: Thu, 10 Apr 2014 11:55:36 +0200 Message-Id: <1397123751-1957-6-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: 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.178 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 Reviewed-by: Tomasz Figa --- 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 */