From patchwork Wed Apr 30 05:17:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4091251 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 69DA9BFF02 for ; Wed, 30 Apr 2014 05:02:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 920AD201F4 for ; Wed, 30 Apr 2014 05:02:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8342201DE for ; Wed, 30 Apr 2014 05:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757511AbaD3FB4 (ORCPT ); Wed, 30 Apr 2014 01:01:56 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:38443 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755784AbaD3E7o (ORCPT ); Wed, 30 Apr 2014 00:59:44 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4T008FXV7KKR80@mailout4.samsung.com>; Wed, 30 Apr 2014 13:59:44 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 03.8E.09952.E3380635; Wed, 30 Apr 2014 13:59:42 +0900 (KST) X-AuditID: cbfee690-b7fcd6d0000026e0-a7-5360833e5b09 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 40.D7.27725.E3380635; Wed, 30 Apr 2014 13:59:42 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4T004J5V7A5170@mmp1.samsung.com>; Wed, 30 Apr 2014 13:59:41 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, t.figa@samsung.com, chow.kim@samsung.com, yg1004.jang@samsung.com, vikas.sajjan@samsung.com, Pankaj Dubey Subject: [PATCH v3 06/12] ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain Date: Wed, 30 Apr 2014 14:17:31 +0900 Message-id: <1398835057-3860-7-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398835057-3860-1-git-send-email-pankaj.dubey@samsung.com> References: <1398835057-3860-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsVy+t8zA1275oRgg2crRS2WTbrLZtG74Cqb xabH11gtLu+aw2Yx4/w+Jovbl3ktFm39wm6xfsZrFoubz7YzWexoWc3iwOXR0tzD5rF5Sb1H 35ZVjB6fN8kFsERx2aSk5mSWpRbp2yVwZTz6vZC1oEuk4s27acwNjLcFuhg5OSQETCQeHFrL CmGLSVy4t56ti5GLQ0hgGaNE49V2Npii3t9TmSESixgllp+9zAiSEBJoY5KYskoBxGYT0JV4 8n4uM4gtIpAtcaXxPlgDs8BuoEmN88AmCQtES5xsbQYrYhFQlXh+8CU7iM0r4C4x+dJKli5G DqBtChJzJtmAhDkFPCQW3v7NCrHLXaKhoYcRZKaEwDp2if+vT7BAzBGQ+Db5EFSvrMSmA8wQ R0tKHFxxg2UCo/ACRoZVjKKpBckFxUnpRSZ6xYm5xaV56XrJ+b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t7NyVFlL023Sz1S7e9bbJDU+YLT9b71tXOJGaqdPdGmF/vv 5EX+9OlmC2+TS5o9d//a/U+O3PucH6PeuYqfUVLCtejlq6Or7y0++6S3kmmCRGOTEktxRqKh FnNRcSIAwRVVGO4CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Young-Gun Jang Current "pm_domain.c" file uses "S5P_INT_LOCAL_PWR_EN" definition from "regs-pmu.h" and hence needs to include this header file. As there is no other user of "S5P_INT_LOCAL_PWR_EN" definition other than pm_domain, to remove "regs-pmu.h" header file dependency from "pm_domain.c" it's better we define this definition in "pm_domain.c" file itself and thus it will help in removing header file inclusion from "pm_domain.c". Also removing "S5P_" prefix from macro. Signed-off-by: Young-Gun Jang Signed-off-by: Pankaj Dubey Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/pm_domains.c | 8 ++++---- arch/arm/mach-exynos/regs-pmu.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index fe6570e..e45d288 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -22,7 +22,7 @@ #include #include -#include "regs-pmu.h" +#define INT_LOCAL_PWR_EN 0x7 /* * Exynos specific wrapper around the generic power domain @@ -44,13 +44,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on) pd = container_of(domain, struct exynos_pm_domain, pd); base = pd->base; - pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0; + pwr = power_on ? INT_LOCAL_PWR_EN : 0; __raw_writel(pwr, base); /* Wait max 1ms */ timeout = 10; - while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN) != pwr) { + while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) { if (!timeout) { op = (power_on) ? "enable" : "disable"; pr_err("Power domain %s %s failed\n", domain->name, op); @@ -172,7 +172,7 @@ static __init int exynos4_pm_init_power_domain(void) platform_set_drvdata(pdev, pd); - on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN; + on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN; pm_genpd_init(&pd->pd, NULL, !on); } diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index b68b5cc..fd8a19d 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -116,7 +116,6 @@ #define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) #define S5P_CORE_LOCAL_PWR_EN 0x3 -#define S5P_INT_LOCAL_PWR_EN 0x7 /* Only for EXYNOS4210 */ #define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154)