From patchwork Sat Apr 26 16:05:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 29160 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 77621202E6 for ; Sat, 26 Apr 2014 16:06:20 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf5413061yha.0 for ; Sat, 26 Apr 2014 09:06:20 -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=n/O1QOS6jwQUKxCJsi/wygxMp8Z/bVdeDqOchDYtOK8=; b=dtCRmWuAoFblEupQui6eTx5QIf+DBcs0Wewx5ZLmaqCHVX+3NW8V3hSy1KQnIIE5JR FWDlOiDvwRLi/R/lNJaPocxcaDjTQ9Jn1OtEz+o2VQt+HfpiESwiGbb0E2rWrNhpOfT4 JW/NIKxjMxuYbp7XQmzCkJhNauiEHmKQi4prStwhvJOXQ1Nns5+c1Fiw99n07/ySMILC MRYYnIx8AdFeyfNIe2UtOgfI7sEaG7NT9olefRydO01qlzjcGF4ayL3w5BKiJ7NZBvRS rKOzTavrgfP6AWYiStQQmLu169ThDQL1s0X7tbzreuFihbqiZUOtTBoX7l+SfhjqgMFl 3Grw== X-Gm-Message-State: ALoCoQlxxDIUfNym5GBu7yN2hvZ89aTl2FNPCfIsb3rpJUVP5dEytIv53z2loCiulH0d3AN8jMj3 X-Received: by 10.58.41.39 with SMTP id c7mr8070632vel.25.1398528379960; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.232 with SMTP id 95ls2139227qgp.68.gmail; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr12646550vev.7.1398528379870; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id is3si2504140vec.99.2014.04.26.09.06.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Apr 2014 09:06:19 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id sa20so6070349veb.8 for ; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr11332143vdb.20.1398528379770; Sat, 26 Apr 2014 09:06:19 -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.221.72 with SMTP id ib8csp9112vcb; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) X-Received: by 10.68.237.33 with SMTP id uz1mr18470611pbc.76.1398528379006; Sat, 26 Apr 2014 09:06:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ho7si7069777pad.233.2014.04.26.09.06.18; Sat, 26 Apr 2014 09:06:18 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbaDZQGR (ORCPT + 9 others); Sat, 26 Apr 2014 12:06:17 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:39502 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552AbaDZQGR (ORCPT ); Sat, 26 Apr 2014 12:06:17 -0400 Received: by mail-pa0-f42.google.com with SMTP id bj1so957541pad.15 for ; Sat, 26 Apr 2014 09:06:16 -0700 (PDT) X-Received: by 10.66.252.135 with SMTP id zs7mr15150383pac.13.1398528376712; Sat, 26 Apr 2014 09:06:16 -0700 (PDT) Received: from localhost.localdomain ([122.171.91.187]) by mx.google.com with ESMTPSA id ha11sm23458195pbd.17.2014.04.26.09.06.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Apr 2014 09:06:16 -0700 (PDT) From: Abhilash Kesavan To: nicolas.pitre@linaro.org, Dave.Martin@arm.com, lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org, linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com, t.figa@samsung.com, abrestic@chromium.org, thomas.ab@samsung.com, inderpal.s@samsung.com Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, grant.likely@linaro.org, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, kesavan.abhilash@gmail.com Subject: [PATCH v3 2/6] ARM: EXYNOS: use generic exynos cpu power control functions Date: Sat, 26 Apr 2014 21:35:44 +0530 Message-Id: <1398528348-21214-3-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398528348-21214-1-git-send-email-a.kesavan@samsung.com> References: <1398528348-21214-1-git-send-email-a.kesavan@samsung.com> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Original-Sender: a.kesavan@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@gmail.com 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: , From: Leela Krishna Amudala Use generic exynos cpu power control functions to power up/down and to know the status of the cpu. Signed-off-by: Leela Krishna Amudala --- arch/arm/mach-exynos/platsmp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 03e5e9f..e3d005b 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -107,15 +107,12 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) */ write_pen_release(phys_cpu); - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { - __raw_writel(S5P_CORE_LOCAL_PWR_EN, - S5P_ARM_CORE1_CONFIGURATION); - + if (!exynos_cpu_power_state(cpu)) { + exynos_cpu_powerup(cpu); timeout = 10; /* wait max 10 ms until cpu1 is on */ - while ((__raw_readl(S5P_ARM_CORE1_STATUS) - & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { + while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) { if (timeout-- == 0) break;