From patchwork Fri Apr 4 07:48:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27786 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE02120369 for ; Fri, 4 Apr 2014 07:48:29 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fb1sf11308232pad.4 for ; Fri, 04 Apr 2014 00:48:29 -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=DbnWViPwmJ4AV6ElYCLKd4hhp1sHg1qEo7kjLdk0PqM=; b=SNsXMVbQ/MPy53zxp9xYanrSuINdTvf5G53O8QIbvh3ws4P8V0xI7NVV6iLmkem48g jum7TvHg+k3ZvUBCgefEZK77huVh4w1HEqbByUypHFGKI8HWHErJx3bXhsx0HrCwjb1P Grglqu3CKjyRxAQlxj3ioKU2b/T7+dUEU7sX01CbQgZsmmWefRstzDBJm1bPbvKEhSdO BRiU251TE29jtLYtR9eahQ4h9xCVbejfwDAUtbRB/ioJldItWCQM2RBMXEStp64oEYhM tavDITTbUlwejIRcjICkWUUvEwBdzTTR2iL9wuNBZvQ2mHNRQvGXvE8EIa1qDGHXMH2N XSuA== X-Gm-Message-State: ALoCoQmd3Y38V78hR953WboJsmK11fgvl7LtJQi8IxgcHZyfev3ft7ZdQDLfG8vEfzYPIv5WZg/M X-Received: by 10.66.188.238 with SMTP id gd14mr6986289pac.18.1396597709129; Fri, 04 Apr 2014 00:48:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.141 with SMTP id g13ls909649qge.76.gmail; Fri, 04 Apr 2014 00:48:29 -0700 (PDT) X-Received: by 10.221.28.202 with SMTP id rv10mr7186404vcb.10.1396597709009; Fri, 04 Apr 2014 00:48:29 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id i7si650339vei.139.2014.04.04.00.48.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:48:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id il7so2884187vcb.32 for ; Fri, 04 Apr 2014 00:48:28 -0700 (PDT) X-Received: by 10.58.187.9 with SMTP id fo9mr3762920vec.4.1396597708938; Fri, 04 Apr 2014 00:48:28 -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 v8csp92844vcv; Fri, 4 Apr 2014 00:48:28 -0700 (PDT) X-Received: by 10.68.196.202 with SMTP id io10mr12954179pbc.149.1396597708043; Fri, 04 Apr 2014 00:48:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si4245781pbq.405.2014.04.04.00.48.27; Fri, 04 Apr 2014 00:48:27 -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 S1752270AbaDDHs0 (ORCPT + 9 others); Fri, 4 Apr 2014 03:48:26 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:56730 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170AbaDDHsH (ORCPT ); Fri, 4 Apr 2014 03:48:07 -0400 Received: by mail-wi0-f178.google.com with SMTP id bs8so684033wib.11 for ; Fri, 04 Apr 2014 00:48:06 -0700 (PDT) X-Received: by 10.194.205.35 with SMTP id ld3mr17495226wjc.82.1396597686204; Fri, 04 Apr 2014 00:48:06 -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 t1sm3028163wia.1.2014.04.04.00.48.04 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 00:48:05 -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 14/17] ARM: exynos: cpuidle: Move the boot vector in pm.c Date: Fri, 4 Apr 2014 09:48:00 +0200 Message-Id: <1396597683-6969-15-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396597683-6969-1-git-send-email-daniel.lezcano@linaro.org> References: <1396597683-6969-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.173 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 --- arch/arm/mach-exynos/cpuidle.c | 22 ---------------------- arch/arm/mach-exynos/pm.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 3872c1e..1916dc6 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -8,42 +8,20 @@ * published by the Free Software Foundation. */ -#include -#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); diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 1c9d253..47fa9bd 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -79,6 +79,14 @@ #define EXYNOS5_PWR_CTRL2_CORE2_UP_RATIO (1 << 4) #define EXYNOS5_PWR_CTRL2_CORE1_UP_RATIO (1 << 0) +#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 const struct sleep_save exynos4_set_clksrc[] = { { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, }, { .reg = EXYNOS4_CLKSRC_MASK_CAM , .val = 0x11111111, }, @@ -189,6 +197,12 @@ static void __init exynos5_core_down_clk(void) __raw_writel(tmp, EXYNOS5_PWR_CTRL2); } +static void exynos_cpu_set_boot_vector(void) +{ + __raw_writel(virt_to_phys(s3c_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 @@ -450,6 +464,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self, exynos_pm_central_suspend(); exynos_cpu_save_register(); exynos_set_wakeupmask(); + exynos_cpu_set_boot_vector(); break; case CPU_PM_EXIT: