From patchwork Fri Apr 25 13:05:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4062171 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 5827ABFF02 for ; Fri, 25 Apr 2014 13:04:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 763C62035C for ; Fri, 25 Apr 2014 13:04:44 +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 80083200CC for ; Fri, 25 Apr 2014 13:04:43 +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 1Wdfl7-0003S7-8T; Fri, 25 Apr 2014 13:01:41 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdfYD-0004aB-59 for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 12:48:22 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4L00HHV7JYZNA0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 21:47:58 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id BF.97.11120.E795A535; Fri, 25 Apr 2014 21:47:58 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-2d-535a597efe8f Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 97.32.27725.E795A535; Fri, 25 Apr 2014 21:47:58 +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 <0N4L00KO87JJLC50@mmp1.samsung.com>; Fri, 25 Apr 2014 21:47:58 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Date: Fri, 25 Apr 2014 22:05:29 +0900 Message-id: <1398431131-5946-2-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398431131-5946-1-git-send-email-pankaj.dubey@samsung.com> References: <1396427085-4696-1-git-send-email-pankaj.dubey@samsung.com> <1398431131-5946-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42I5/e+ZgW5dZFSwwYMlKhYbZ6xntVg26S6b Re+Cq2wWmx5fY7W4vGsOm8WM8/uYLG5f5rVYtPULu8X6Ga9ZLG4+285ksaNlNYsDt0dLcw+b x+Yl9R59W1YxenzeJBfAEsVlk5Kak1mWWqRvl8CVMeNqL0vBRumKf/O+sTQwfhXrYuTkkBAw kWi5OJEZwhaTuHBvPVsXIxeHkMAyRomOS72sMEVP17YwQiQWMUrM6D7MBOG0MUl8XtcB1s4m oCvx5P1cMFtEIFviSuN9ZpAiZoGrjBInX7aDJYQFwiTe3jjDBGKzCKhKvG/vAVvBK+AuceHU P/YuRg6gdQoScybZgIQ5BTwkfjXNhlrWyijx918XmCMhsIldovPtPHaIQQIS3yYfYoFolpXY dADqH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0LKKN0+eawTfC9jy89SdAunHqmqvXXgevj8j1NhY+5Pxpn6WgMEBp64XCZ6Xd+loLL9+7oe5 oKwpe6L4x1q7g6IKuxTdnUMs279uSprmku4ZwF555vTlq9EX85XuLXf8YRN/RuXjkZUt8Uos xRmJhlrMRcWJAH4nWFz1AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140425_054821_408880_0D222C65 X-CRM114-Status: GOOD ( 12.38 ) X-Spam-Score: -5.7 (-----) Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, b.zolnierkie@samsung.com, Pankaj Dubey , t.figa@samsung.com, yg1004.jang@samsung.com, vikas.sajjan@samsung.com, chow.kim@samsung.com 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.5 required=5.0 tests=BAYES_00,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: Younggun Jang This patch moves PMU specific definitions into a new file as exynos-pmu.h. This will help in making PMU implementation independent of common.h header. Signed-off-by: Young-Gun Jang Signed-off-by: Pankaj Dubey --- arch/arm/mach-exynos/common.h | 17 ----------------- arch/arm/mach-exynos/cpuidle.c | 1 + arch/arm/mach-exynos/exynos-pmu.h | 31 +++++++++++++++++++++++++++++++ arch/arm/mach-exynos/pm.c | 1 + arch/arm/mach-exynos/pmu.c | 2 +- 5 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 arch/arm/mach-exynos/exynos-pmu.h diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index ad5128e..d848ede 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -38,24 +38,7 @@ extern struct smp_operations exynos_smp_ops; extern void exynos_cpu_die(unsigned int cpu); -/* PMU(Power Management Unit) support */ - -#define PMU_TABLE_END 0xFFFF - -enum sys_powerdown { - SYS_AFTR, - SYS_LPA, - SYS_SLEEP, - NUM_SYS_POWERDOWN, -}; - extern unsigned long l2x0_regs_phys; -struct exynos_pmu_conf { - unsigned int offset; - unsigned int val[NUM_SYS_POWERDOWN]; -}; - -extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); extern struct regmap *get_exynos_pmuregmap(void); extern void __iomem *get_exynos_pmuaddr(void); diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 5dcdd46..ff3be9c 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -32,6 +32,7 @@ #include "common.h" #include "regs-pmu.h" +#include "exynos-pmu.h" #define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h new file mode 100644 index 0000000..1cc857b --- /dev/null +++ b/arch/arm/mach-exynos/exynos-pmu.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Header for EXYNOS PMU Driver support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __EXYNOS_PMU_H +#define __EXYNOS_PMU_H + +#define PMU_TABLE_END 0xFFFF + +enum sys_powerdown { + SYS_AFTR, + SYS_LPA, + SYS_SLEEP, + NUM_SYS_POWERDOWN, +}; + +struct exynos_pmu_conf { + unsigned int offset; + unsigned int val[NUM_SYS_POWERDOWN]; +}; + +extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); + +#endif /* __EXYNOS_PMU_H */ diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index e4c10d4..103ab92 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -37,6 +37,7 @@ #include "common.h" #include "regs-pmu.h" #include "regs-sys.h" +#include "exynos-pmu.h" static struct regmap *pmu_regmap; diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index abcf753..d020557 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -16,7 +16,7 @@ #include #include -#include "common.h" +#include "exynos-pmu.h" #include "regs-pmu.h" enum exynos_pmu_id {