From patchwork Fri May 2 15:25:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 29557 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 79909202E7 for ; Fri, 2 May 2014 15:25:36 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id cm18sf9838294qab.9 for ; Fri, 02 May 2014 08:25:36 -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=spgSpQegwtmuq1ChnRqvn3kawbdyAq+9pUEyd/aQvyo=; b=PWJxBqddNkb1zdkA2qIM16US36Pzw7zSFxWozVA6ld6LItclkzBBBUKqjbFyrUROqO fox/N0TdakoRUS1kRa+e28sOsvLTVzZszV3YPlyKcr18HiKn5BPNKy35gf2iuRLeHg1Y ypSXMlGI+JbTXcap1qoUrkzTTiMorwbY0WlmCl/Kq4oMXFYQhyss5Sp/Eu+mewPfJJHo l8419oPfNnUoM4Z5+6h7zfjlX+Z1GkyxQjyzQbMj5SSxWnmAtpVDBDMBJ/Yw7QTcRCFR 0gnzZ2F9+gbefOwBcbrjSPd/jpGg0Ii+gqXBRTz11O+ZY8HLYwqc2MsUxkHiK7RwK1G2 5qhQ== X-Gm-Message-State: ALoCoQnxFeWVF5J7ZV1nmuXqKpQJwR8Ygp5eOQRpmWOcx++MVWg0dSpAJeUNaqxZ2LjBe+E6k1Y7 X-Received: by 10.236.144.136 with SMTP id n8mr8345677yhj.22.1399044336167; Fri, 02 May 2014 08:25:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.203 with SMTP id 69ls1573629qgl.35.gmail; Fri, 02 May 2014 08:25:36 -0700 (PDT) X-Received: by 10.52.156.39 with SMTP id wb7mr36562vdb.97.1399044336000; Fri, 02 May 2014 08:25:36 -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 y10si6776894vei.204.2014.05.02.08.25.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 08:25:35 -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 db11so858448veb.8 for ; Fri, 02 May 2014 08:25:35 -0700 (PDT) X-Received: by 10.220.89.4 with SMTP id c4mr456718vcm.53.1399044335640; Fri, 02 May 2014 08:25:35 -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 ib8csp110991vcb; Fri, 2 May 2014 08:25:35 -0700 (PDT) X-Received: by 10.50.13.100 with SMTP id g4mr5122116igc.9.1399044334466; Fri, 02 May 2014 08:25:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ks1si3305517igb.3.2014.05.02.08.25.34; Fri, 02 May 2014 08:25:34 -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 S1752207AbaEBPZd (ORCPT + 9 others); Fri, 2 May 2014 11:25:33 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:39236 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbaEBPZc (ORCPT ); Fri, 2 May 2014 11:25:32 -0400 Received: by mail-pa0-f53.google.com with SMTP id kp14so1075912pab.40 for ; Fri, 02 May 2014 08:25:31 -0700 (PDT) X-Received: by 10.66.218.36 with SMTP id pd4mr36107339pac.141.1399044331110; Fri, 02 May 2014 08:25:31 -0700 (PDT) Received: from localhost.localdomain ([122.171.93.130]) by mx.google.com with ESMTPSA id ss2sm184371104pab.8.2014.05.02.08.25.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 08:25:30 -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 v4 2/5] ARM: EXYNOS: use generic exynos cpu power control functions Date: Fri, 2 May 2014 20:55:14 +0530 Message-Id: <1399044314-15672-1-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398528348-21214-3-git-send-email-a.kesavan@samsung.com> References: <1398528348-21214-3-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 0aac032..d442a66 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -130,15 +130,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;