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: 4069281 Return-Path: X-Original-To: patchwork-linux-arm@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 75AA9BFF02 for ; Sat, 26 Apr 2014 16:09:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A14BF20222 for ; Sat, 26 Apr 2014 16:09:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD06820256 for ; Sat, 26 Apr 2014 16:09:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1We57n-0001zw-KE; Sat, 26 Apr 2014 16:06:47 +0000 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1We57e-0001h3-RI for linux-arm-kernel@lists.infradead.org; Sat, 26 Apr 2014 16:06:39 +0000 Received: by mail-pd0-f176.google.com with SMTP id r10so4192498pdi.35 for ; Sat, 26 Apr 2014 09:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=eDZ79Lyh2tVGV0Akzb2HffblBkX7nHHDD4DGVXln3k8=; b=0tIRbdvaNlU9ntp3KtXCuAIXaAKLCZBIazERLmfuJFxthNCGRWpsmBHlyhyZqx+Uq2 B2bE5S7RyH7B6rRFQrrDOutSVRrtZ7i86jdgnaOc2wkcEq/Vgfa4Nvf0SyQ7mdrYw55I MM4cBRAtPx0zbvMOI1agA2zueAaopKFhPjXUKvJNZbpWNNauX4UvTGnXbdzHBLwEzLxN kDdOnE12LrMZ8UvOZVcbxT9igukZVtQZSjZYjonBhqFaC79lrPHDQPbloFaHn3Sz0EL5 dK+A6VbJaPZso5KLmwWXz+7FLnng+z2FeKpWJriI4929FSJYY6+3+37o4N1Fqp6R6wgl dXrw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140426_090638_898567_D22C6377 X-CRM114-Status: GOOD ( 11.44 ) X-Spam-Score: 0.0 (/) Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, kesavan.abhilash@gmail.com, arnd@arndb.de, will.deacon@arm.com, robh+dt@kernel.org, grant.likely@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 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;