From patchwork Thu Apr 10 09:55:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 28146 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2610620671 for ; Thu, 10 Apr 2014 09:56:09 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id pa12sf11399526veb.8 for ; Thu, 10 Apr 2014 02:56:08 -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=ZwfiyLQY9q67TYRZyXKDCBbjTRpRbGOtDgSYfgtipw4=; b=C3XXUBibJhXNaVEWZk9vkM8hatDnDEfq37gBBjtq+o/HTfGBgyIq+KE7Gpbj5WW6qp leqWuML7wj46t2GRTjhcXHJK2xCoOhBelsVAwJ7Pvz6NEFsVlQ37orBZEWz40hg1lghL j8s+Fm+F0NIon4Bbyos9tQ8RRkK35avjJKISZoEFAW5Y1MDoCn1+ot4HMkJoxkCCyqmO 4ivBc55RIMrOM7VqsgNQTu6e/744BXOKl77+9pBWH2zXpeKSRyKTwJhxBbE6EIc5li7Q KUCY8Oy/JbADj31VYQ211/Luq10JWoNG9ODGx+ypnXnZLRDX9gHDZS61pDxRNf4rH9QH mDXQ== X-Gm-Message-State: ALoCoQm3SCPF0MHr3syBQZL33CuNLYec1BAYwrHnJHCCYtjs8NlSdGX8GRYM9k4n3svbKEQGYvau X-Received: by 10.236.39.99 with SMTP id c63mr7195574yhb.31.1397123768903; Thu, 10 Apr 2014 02:56:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.144 with SMTP id 16ls417983qgt.62.gmail; Thu, 10 Apr 2014 02:56:08 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr13236299vec.19.1397123768770; Thu, 10 Apr 2014 02:56:08 -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 kj3si7630vdb.204.2014.04.10.02.56.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:56:08 -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 im17so3143193vcb.37 for ; Thu, 10 Apr 2014 02:56:08 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr13767914vcb.6.1397123768686; Thu, 10 Apr 2014 02:56:08 -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 ib8csp45049vcb; Thu, 10 Apr 2014 02:56:08 -0700 (PDT) X-Received: by 10.68.196.226 with SMTP id ip2mr18452882pbc.106.1397123768030; Thu, 10 Apr 2014 02:56:08 -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.56.07; Thu, 10 Apr 2014 02:56:07 -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 S965642AbaDJJ4G (ORCPT + 9 others); Thu, 10 Apr 2014 05:56:06 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:50247 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965640AbaDJJzv (ORCPT ); Thu, 10 Apr 2014 05:55:51 -0400 Received: by mail-wi0-f180.google.com with SMTP id q5so4655371wiv.1 for ; Thu, 10 Apr 2014 02:55:50 -0700 (PDT) X-Received: by 10.180.39.175 with SMTP id q15mr41755605wik.4.1397123750262; Thu, 10 Apr 2014 02:55:50 -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.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:55:49 -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 12/20] ARM: exynos: cpuidle: Encapsulate boot vector code into a function Date: Thu, 10 Apr 2014 11:55:43 +0200 Message-Id: <1397123751-1957-13-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: , Signed-off-by: Daniel Lezcano --- arch/arm/mach-exynos/cpuidle.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index ddbb2c5..ed7a439 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -45,13 +45,16 @@ static void exynos_set_wakeupmask(long mask) __raw_writel(mask, S5P_WAKEUP_MASK); } +static void exynos_cpu_set_boot_vector(long flags) +{ + __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR); + __raw_writel(flags, REG_DIRECTGO_FLAG); +} + static int idle_finisher(unsigned long flags) { exynos_set_wakeupmask(0x0000ff3e); - - __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR); - __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); - + exynos_cpu_set_boot_vector(S5P_CHECK_AFTR); /* Set value of power down register for aftr mode */ exynos_sys_powerdown_conf(SYS_AFTR);