From patchwork Tue Apr 8 12:19: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: 27950 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E6E4220553 for ; Tue, 8 Apr 2014 12:19:52 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id eb12sf3765940oac.7 for ; Tue, 08 Apr 2014 05:19:52 -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=cmwaXArUmCg2+DLKqUF/jjqjxoYPiHejQ+MdXXRPxEE=; b=UJ3G13wXvku+EcMBlJtsQwwM/F23hgFJzCSJqTiXp/uNI9C7M0cLItRjS+jyLOr9Gd AjH/fCGe+sREATMwxpWUhhT8nZMRG45DqD62MPxbef/XIdgodcxdTL1yyXrzqoqZNyY8 6AOJ9pkiBvc7PwEcPdZ/EgUjJ287B7sxR+xFfTjf8CrM/OYdK8okGLRx9rQV7lIWnZKZ VcN9yBdWW9lmobaeCqb9PTwKlMuB5hR9aelVhCSFtuc27Vm/iVmBBf1hxZhOMW31fz3W MyFtLC3iYf9ItZc5NpSM3LFE5McDN44MYYYZCrCAMVIAYSf5HiVgnqPOfk7EE/WXURWz HMDg== X-Gm-Message-State: ALoCoQkDrMjUDI7JMzCdlnWWGl4zLqo25H0jzy90fHAjg6qfMWF9L+7aHA/RPkRJx/wThn2qNU+Q X-Received: by 10.42.216.144 with SMTP id hi16mr1377822icb.7.1396959592307; Tue, 08 Apr 2014 05:19:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.33 with SMTP id q30ls174442qgd.99.gmail; Tue, 08 Apr 2014 05:19:52 -0700 (PDT) X-Received: by 10.52.191.100 with SMTP id gx4mr2519558vdc.4.1396959592169; Tue, 08 Apr 2014 05:19:52 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id fa16si351401veb.190.2014.04.08.05.19.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id db12so691759veb.10 for ; Tue, 08 Apr 2014 05:19:52 -0700 (PDT) X-Received: by 10.58.1.97 with SMTP id 1mr1571668vel.23.1396959592091; Tue, 08 Apr 2014 05:19:52 -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 v8csp240641vcv; Tue, 8 Apr 2014 05:19:51 -0700 (PDT) X-Received: by 10.66.141.165 with SMTP id rp5mr4261390pab.90.1396959591122; Tue, 08 Apr 2014 05:19:51 -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.50; Tue, 08 Apr 2014 05:19:50 -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 S1756627AbaDHMTu (ORCPT + 9 others); Tue, 8 Apr 2014 08:19:50 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:43602 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756227AbaDHMTt (ORCPT ); Tue, 8 Apr 2014 08:19:49 -0400 Received: by mail-wi0-f175.google.com with SMTP id cc10so6901168wib.2 for ; Tue, 08 Apr 2014 05:19:48 -0700 (PDT) X-Received: by 10.180.98.232 with SMTP id el8mr4161296wib.27.1396959588524; Tue, 08 Apr 2014 05:19:48 -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.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 05:19:47 -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 14/17] ARM: exynos: cpuidle: Move the boot vector in pm.c Date: Tue, 8 Apr 2014 14:19:36 +0200 Message-Id: <1396959579-18268-15-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.179 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: , As usual, move the boot vector setting in the pm.c file and use the cpu_pm notifier to set it up. Remove the unused headers. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/cpuidle.c | 23 ----------------------- arch/arm/mach-exynos/pm.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 44d169b..4b94181 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -8,46 +8,23 @@ * published by the Free Software Foundation. */ -#include -#include #include #include -#include -#include -#include #include #include #include -#include #include #include -#include - -#include #include "common.h" -#include "regs-pmu.h" - -#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ - S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0)) -#define REG_DIRECTGO_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ - S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1)) static int idle_finisher(unsigned long flags) { - - __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; } diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 90fb692..e4ecd8c 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -172,6 +172,20 @@ static void __init exynos5_core_down_clk(void) __raw_writel(tmp, EXYNOS5_PWR_CTRL2); } +#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ + S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ + (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0)) + +#define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ + S5P_INFORM6 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ + (S5P_VA_SYSRAM + 0x20) : S5P_INFORM1)) + +static void exynos_cpu_set_boot_vector(void) +{ + __raw_writel(virt_to_phys(exynos_cpu_resume), EXYNOS_BOOT_VECTOR_ADDR); + __raw_writel(S5P_CHECK_AFTR, EXYNOS_BOOT_VECTOR_FLAG); +} + static int exynos_cpu_suspend(unsigned long arg) { #ifdef CONFIG_CACHE_L2X0 @@ -387,6 +401,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, exynos_cpu_save_register(); exynos_set_wakeupmask(); } + exynos_cpu_set_boot_vector(); break; case CPU_PM_EXIT: