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: 3961381 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 E77E3BFF02 for ; Thu, 10 Apr 2014 09:56:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3470420629 for ; Thu, 10 Apr 2014 09:56:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5924020630 for ; Thu, 10 Apr 2014 09:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965642AbaDJJ4G (ORCPT ); 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-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=NTV1k0m4ROVMjy+k8LpBGkLaMaZgE8HAHETReQNhV+k=; b=m22iw5rOtESjenkmS9sPe0wfbmLXu7QHwhYuGfX7XU9SwYyg5anmHk/S3Y4e+V5DEW +PzLQImLLzuBrUohLSUlK/LNS3reV5MTSfKySBSx+MHRdPGbwu4aIrUY9heB5SKT+0O4 UY9mdvMmW+0tGOMgeko8lTvrx7cblUOUUj+pUPSzV7LFi+3nbeBgfXrBHZFJlP2mtEh/ aIjlggl+fmKZc/ikTgENNq2iJXScSZ+Xf3b9OnoScIeqMkE5roLi4nwzoalyE0XRPStD d62yDfczktJCTzoycUHmUK9DWKbZVLwCcNPIPOYsB5SD1xMDv9go8BdGWWte911h0yAR Dzcw== X-Gm-Message-State: ALoCoQmpJ/l/8vAsmsM8apQQSaXPB4BvhqLm0O0SCANmM4rp4serl6zAKm5ubsedNk9z+kCTprld 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: 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 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);