From patchwork Mon May 5 16:26:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 29662 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 372C02055D for ; Mon, 5 May 2014 16:27:36 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id z6sf3012366yhz.4 for ; Mon, 05 May 2014 09:27:35 -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=SI6pE0JMrH6QXGoUgCFeqU8AkMU/hMbITlFC2zywIf5b2OkXHqJ3ylge/gfRJRpiw9 iWnhugUwiui9C18fPmWcqbs5rryyHspuR6pAbp6GcHL6sRV3YvFcKrcIaEFTFUoFxTbd Bgbw0m0wlvo9zCnQh/oCjBHusaNJhZaOaWjiKpZt9kwh3oDUDcO+NdwNtZN/DwbSE0PF aC+vob8vRG39YjR4T8TK37GEXUXrZOwjgUNBJFgtvAhGBnh7N1a3z4Ukig8WyO6C4oVF a3Oj8mNEjopXH8BHXFP5SkeSm2dalJj+lLtWL61SGAQCDjul6JnSMRcBg2ghJfnJZiBN xHEw== X-Gm-Message-State: ALoCoQk7okwyUx0TN3BMJ7kUn1G2Y+DXxHFCXaG9pjgTEgLTf11xI+atPjmSfPXPeGpVg6TVpqtA X-Received: by 10.236.77.194 with SMTP id d42mr14459353yhe.21.1399307255939; Mon, 05 May 2014 09:27:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.134 with SMTP id t6ls2452852qgd.20.gmail; Mon, 05 May 2014 09:27:35 -0700 (PDT) X-Received: by 10.220.166.211 with SMTP id n19mr597377vcy.69.1399307255781; Mon, 05 May 2014 09:27:35 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id xt2si1713353vcb.33.2014.05.05.09.27.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 May 2014 09:27: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::22f; Received: by mail-ve0-f175.google.com with SMTP id jw12so2162633veb.20 for ; Mon, 05 May 2014 09:27:35 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr28634996vec.15.1399307255660; Mon, 05 May 2014 09:27: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 ib8csp153721vcb; Mon, 5 May 2014 09:27:35 -0700 (PDT) X-Received: by 10.66.184.239 with SMTP id ex15mr25708970pac.122.1399307254764; Mon, 05 May 2014 09:27:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id to1si9031711pab.486.2014.05.05.09.27.34; Mon, 05 May 2014 09:27: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 S1753643AbaEEQ1d (ORCPT + 8 others); Mon, 5 May 2014 12:27:33 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:62005 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632AbaEEQ1c (ORCPT ); Mon, 5 May 2014 12:27:32 -0400 Received: by mail-pd0-f173.google.com with SMTP id y10so4524158pdj.4 for ; Mon, 05 May 2014 09:27:32 -0700 (PDT) X-Received: by 10.66.141.165 with SMTP id rp5mr74099038pab.90.1399307252075; Mon, 05 May 2014 09:27:32 -0700 (PDT) Received: from localhost.localdomain ([122.171.76.161]) by mx.google.com with ESMTPSA id f5sm74977298pat.11.2014.05.05.09.27.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 May 2014 09:27:31 -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, linux-samsung-soc@vger.kernel.org Subject: [PATCH v5 2/5] ARM: EXYNOS: use generic exynos cpu power control functions Date: Mon, 5 May 2014 21:56:58 +0530 Message-Id: <1399307221-8659-3-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1399307221-8659-1-git-send-email-a.kesavan@samsung.com> References: <1399307221-8659-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=@ 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;