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: 3938341 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE6D5BFF02 for ; Fri, 4 Apr 2014 13:43:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C505203DC for ; Fri, 4 Apr 2014 13:43:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 266D920396 for ; Fri, 4 Apr 2014 13:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651AbaDDNnS (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F95NuQoh84ScFH67E4f5567KF3+Wr4bVkLh9qbaA3XA=; b=kYzi2Ta0ilLCjy//mbvQQYtHFXIBj5V3yafg84PJWQ3EtNbo36M60zRIWi0WTluCtH gvO5/ODIm6kOSFvIFCaX0/DeTOQGB1RIB8jN87ZrMCt/ryw+EZCJDhAaZeEcfQjJl2VH 0H0bf8o/eCAV6ZiYSImJj3uGBXg3uNGTdwvE5Sjsddn4AjqdmtI7BJry/y/0s13QB/K7 ihNNFEGfgYvvPVY+KU44scChOCWYz6KaMb/KOB3JVdBCdf1I7iBLXCQRe2x5Ho7M4BMX zEUEvqTLSMwjSM8ELsIViFawd1+hA40EG7j9t0vR8Bh0J7dCaTf2KWnwXvgmcTADvH4+ puDQ== X-Gm-Message-State: ALoCoQkOQhki6+JP5OVZPi9AW+6Vkj5HnoyihxvrvETVxK479bh3mG5xNPXQYA0NiMB/fTpkiIn6 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: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: