From patchwork Thu Apr 24 09:31:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leela Krishna Amudala X-Patchwork-Id: 28954 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7AC62036A for ; Thu, 24 Apr 2014 09:32:49 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id lx4sf12626041iec.11 for ; Thu, 24 Apr 2014 02:32:49 -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=XnGGU2pczv3yojd8clSZQr4+poGeEx/2ocfXBhtaCIM=; b=J8O4P1Iqr11Hj0BGJK5RQfKtISbY2WL8oc4+9dmp/gKyqJSvHlfqxF2HivInUdl87S xTmYWCGGAqfjOst4biuGWRBz10XlBs0/B1DzZoMvKzMFARZyFjAPv+SOX1hNoFci+pxN ByU9i/xkkSHqVIzQBM+YTggowdFXWI/nauvvhU3A9SZcL8ugfp2FZm8GEsZD0+DxN8rF QiGxJ+lg55u5tgWwnVvXKTaWJYyioOWk8lZJXpBeKpmJF822RxMeNM1DpWGW0/a3ZKyg OMtv07QOsDhknZSI0AxxLjh51qOR5qHjmA/Ek4pZ3MGZUUqSzoXHMk15h2nj6vZ2OFJp 0ngg== X-Gm-Message-State: ALoCoQn/cQPU6el6EtgKCNdjOurP32vWBhVvY2LS0iZoxRVh356l0dQQXrQXDBjNVbe3k5fkYQ3a X-Received: by 10.182.219.226 with SMTP id pr2mr550995obc.44.1398331969184; Thu, 24 Apr 2014 02:32:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.107 with SMTP id b98ls921845qgd.64.gmail; Thu, 24 Apr 2014 02:32:49 -0700 (PDT) X-Received: by 10.52.0.193 with SMTP id 1mr432983vdg.0.1398331969067; Thu, 24 Apr 2014 02:32:49 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id ww7si798137vec.102.2014.04.24.02.32.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 02:32:49 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so2584623vcb.36 for ; Thu, 24 Apr 2014 02:32:49 -0700 (PDT) X-Received: by 10.221.55.133 with SMTP id vy5mr459295vcb.17.1398331968986; Thu, 24 Apr 2014 02:32:48 -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 ib8csp1852vcb; Thu, 24 Apr 2014 02:32:48 -0700 (PDT) X-Received: by 10.68.219.162 with SMTP id pp2mr14969379pbc.47.1398331968284; Thu, 24 Apr 2014 02:32:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nt4si2327864pbb.113.2014.04.24.02.32.47; Thu, 24 Apr 2014 02:32:47 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-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 S1755312AbaDXJcU (ORCPT + 9 others); Thu, 24 Apr 2014 05:32:20 -0400 Received: from mail-pb0-f47.google.com ([209.85.160.47]:38373 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755686AbaDXJbz (ORCPT ); Thu, 24 Apr 2014 05:31:55 -0400 Received: by mail-pb0-f47.google.com with SMTP id up15so1770613pbc.20 for ; Thu, 24 Apr 2014 02:31:53 -0700 (PDT) X-Received: by 10.68.240.68 with SMTP id vy4mr28651969pbc.127.1398331913590; Thu, 24 Apr 2014 02:31:53 -0700 (PDT) Received: from lk-linux.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id yv5sm7847048pbb.49.2014.04.24.02.31.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 02:31:52 -0700 (PDT) From: Leela Krishna Amudala To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: daniel.lezcano@linaro.org, nicolas.pitre@linaro.org, kgene.kim@samsung.com, amit.kucheria@linaro.org Subject: [PATCH 2/2] ARM: EXYNOS: use generic exynos cpu power control functions Date: Thu, 24 Apr 2014 15:01:59 +0530 Message-Id: <1398331919-28321-3-git-send-email-leela.krishna@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398331919-28321-1-git-send-email-leela.krishna@linaro.org> References: <1398331919-28321-1-git-send-email-leela.krishna@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leela.krishna@linaro.org 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 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: , 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;