From patchwork Fri Apr 4 13:43:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 27831 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA86A20369 for ; Fri, 4 Apr 2014 13:43:25 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 200sf6266463ykr.2 for ; Fri, 04 Apr 2014 06:43:25 -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=8Hg0gvYLrL3uY7O7Gzo6rS6QACqxvwSyQAbonTjcumc=; b=H2YcmHzyUMZ1yJDchQw2lJniMMUPsjMIkMtMBxIwglEW94MDmZk87AMI8NKrXGvg0/ WIOrzzI5tEsREFEllCkazSU04F/mJ/IMoUNXw+fArntnvUW+2u7HPmwDX+HJknsrRcSz mHkDXvOJhFsPGE+zRRREWHpQ93pao/R6eI5SovHw/Pdh7YM8+7Jn/1gWYYOM3YQc4OVo e2Jo3qm2TknvUL84mwqeLilATru1Ha8Ba42hcDNxoalEQBLbuukEq7jLAW1kI6ww/B9h ny2dChFfmnT4a4JWIGsztztVoJ1wGq0X+RP14WbkAiow41yukVQ4cHtjLFYmnZa9lf96 V2RA== X-Gm-Message-State: ALoCoQlSW5UxM0xM5XDu7mBvX3nl8rQQeARhVoRbzjh3IyH4lM5nFYqZnskK1de1FbtJu/kxWdNS X-Received: by 10.58.88.136 with SMTP id bg8mr3935951veb.21.1396619005402; Fri, 04 Apr 2014 06:43:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls1053800qgf.84.gmail; Fri, 04 Apr 2014 06:43:25 -0700 (PDT) X-Received: by 10.58.248.5 with SMTP id yi5mr133840vec.42.1396619005292; Fri, 04 Apr 2014 06:43:25 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id tm8si1771469vdc.188.2014.04.04.06.43.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so1418058veb.39 for ; Fri, 04 Apr 2014 06:43:25 -0700 (PDT) X-Received: by 10.52.65.165 with SMTP id y5mr110852vds.51.1396619005199; Fri, 04 Apr 2014 06:43:25 -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 v8csp115351vcv; Fri, 4 Apr 2014 06:43:24 -0700 (PDT) X-Received: by 10.68.143.196 with SMTP id sg4mr14799452pbb.155.1396619000684; Fri, 04 Apr 2014 06:43:20 -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.20; Fri, 04 Apr 2014 06:43:20 -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 S1752651AbaDDNnS (ORCPT + 9 others); Fri, 4 Apr 2014 09:43:18 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:62064 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752841AbaDDNnQ (ORCPT ); Fri, 4 Apr 2014 09:43:16 -0400 Received: by mail-wg0-f48.google.com with SMTP id l18so3510770wgh.7 for ; Fri, 04 Apr 2014 06:43:15 -0700 (PDT) X-Received: by 10.194.175.70 with SMTP id by6mr20077009wjc.3.1396618995709; Fri, 04 Apr 2014 06:43:15 -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.43.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:43:15 -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 14/17] ARM: exynos: cpuidle: Move the boot vector in pm.c Date: Fri, 4 Apr 2014 15:43:06 +0200 Message-Id: <1396618989-2897-15-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.128.180 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: