From patchwork Mon Oct 26 12:55:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 7488281 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8B897BEEA4 for ; Mon, 26 Oct 2015 13:06:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03D8320444 for ; Mon, 26 Oct 2015 13:06:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48DA7205EE for ; Mon, 26 Oct 2015 13:06:17 +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 1ZqhS2-00050n-6t; Mon, 26 Oct 2015 13:04:38 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZqhRw-0004kT-2z for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2015 13:04:34 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWT01I0XWAYEA30@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2015 22:04:10 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.122]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 57.01.05385.AC42E265; Mon, 26 Oct 2015 22:04:10 +0900 (KST) X-AuditID: cbfee691-f79d66d000001509-6b-562e24ca91cf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id AD.DB.23663.AC42E265; Mon, 26 Oct 2015 22:04:10 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NWT00EECVZZAV40@mmp1.samsung.com>; Mon, 26 Oct 2015 22:04:10 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 7/7] drivers: soc: Add support for Exynos PMU driver Date: Mon, 26 Oct 2015 18:25:43 +0530 Message-id: <1445864143-25695-8-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.4.5 In-reply-to: <1445864143-25695-1-git-send-email-pankaj.dubey@samsung.com> References: <1445864143-25695-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsWyRsSkSveUil6Ywf55hhYfV79ks3j9wtCi d8FVNotNj6+xWlzeNYfNYsb5fUwWi7Z+YbfoWMbowOGxc9Zddo/NS+o9+rasYvT4vEkugCWK yyYlNSezLLVI3y6BK2NVSzdLwSfVinfXp7M2MC5W6GLk5JAQMJFo/3eHGcIWk7hwbz1bFyMX h5DACkaJgzcXscMUXdl4jg3EFhJYyiix6aswRFErk8TEKy/AutkEdCWevJ8LZosIZEtcabzP DFLELNDNKHHs7mqwbmEBd4m5X/pYQWwWAVWJ0/P3MoLYvAIeEitOPAayOYC2yUksba4FCXMK eEpseveYBSQsBFQypQFsr4TAdHaJvjUfmCHGCEh8m3yIBaJVVmLTAahnJCUOrrjBMoFReAEj wypG0dSC5ILipPQiU73ixNzi0rx0veT83E2MwPA+/e/ZxB2M9w9YH2IU4GBU4uF9waMbJsSa WFZcmXuI0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fdJtRaaLC+tfOOjH9Iis z79paryjLFMjIvj8FC4u3uN/Tz5s45LRvTjdRFzIXEGJpTgj0VCLuag4EQCMXWCotwIAAA== 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-20151026_060432_323682_A6DE87FC X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amitdanielk@gmail.com, k.kozlowski@samsung.com, kgene.kim@samsung.com, thomas.ab@samsung.com, Pankaj Dubey 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This patch moves Exynos PMU driver implementation from "arm/mach-exynos" to "drivers/soc/samsung". This driver is mainly used for setting misc bits of register from PMU IP of Exynos SoC which will be required to configure before Suspend/Resume. Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but moving ahead for ARM64 based SoC support, there is a need of this PMU driver in driver/* folder. This driver uses existing DT binding information and there should be no functionality change in the supported platforms. Signed-off-by: Amit Daniel Kachhap Signed-off-by: Pankaj Dubey --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/Makefile | 4 +--- drivers/soc/samsung/Kconfig | 4 ++++ drivers/soc/samsung/Makefile | 4 ++++ arch/arm/mach-exynos/pmu.c => drivers/soc/samsung/exynos-pmu.c | 0 {arch/arm/mach-exynos => drivers/soc/samsung}/exynos-pmu.h | 0 {arch/arm/mach-exynos => drivers/soc/samsung}/exynos3250-pmu.c | 0 {arch/arm/mach-exynos => drivers/soc/samsung}/exynos4-pmu.c | 0 {arch/arm/mach-exynos => drivers/soc/samsung}/exynos5250-pmu.c | 0 {arch/arm/mach-exynos => drivers/soc/samsung}/exynos5420-pmu.c | 0 10 files changed, 10 insertions(+), 3 deletions(-) rename arch/arm/mach-exynos/pmu.c => drivers/soc/samsung/exynos-pmu.c (100%) rename {arch/arm/mach-exynos => drivers/soc/samsung}/exynos-pmu.h (100%) rename {arch/arm/mach-exynos => drivers/soc/samsung}/exynos3250-pmu.c (100%) rename {arch/arm/mach-exynos => drivers/soc/samsung}/exynos4-pmu.c (100%) rename {arch/arm/mach-exynos => drivers/soc/samsung}/exynos5250-pmu.c (100%) rename {arch/arm/mach-exynos => drivers/soc/samsung}/exynos5420-pmu.c (100%) diff --git a/arch/arm/mach-exynos/pmu.c b/drivers/soc/samsung/exynos-pmu.c similarity index 100% rename from arch/arm/mach-exynos/pmu.c rename to drivers/soc/samsung/exynos-pmu.c diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h similarity index 100% rename from arch/arm/mach-exynos/exynos-pmu.h rename to drivers/soc/samsung/exynos-pmu.h diff --git a/arch/arm/mach-exynos/exynos3250-pmu.c b/drivers/soc/samsung/exynos3250-pmu.c similarity index 100% rename from arch/arm/mach-exynos/exynos3250-pmu.c rename to drivers/soc/samsung/exynos3250-pmu.c diff --git a/arch/arm/mach-exynos/exynos4-pmu.c b/drivers/soc/samsung/exynos4-pmu.c similarity index 100% rename from arch/arm/mach-exynos/exynos4-pmu.c rename to drivers/soc/samsung/exynos4-pmu.c diff --git a/arch/arm/mach-exynos/exynos5250-pmu.c b/drivers/soc/samsung/exynos5250-pmu.c similarity index 100% rename from arch/arm/mach-exynos/exynos5250-pmu.c rename to drivers/soc/samsung/exynos5250-pmu.c diff --git a/arch/arm/mach-exynos/exynos5420-pmu.c b/drivers/soc/samsung/exynos5420-pmu.c similarity index 100% rename from arch/arm/mach-exynos/exynos5420-pmu.c rename to drivers/soc/samsung/exynos5420-pmu.c diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 83c85f5..874cb38 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -16,6 +16,7 @@ menuconfig ARCH_EXYNOS select ARM_GIC select COMMON_CLK_SAMSUNG select EXYNOS_THERMAL + select EXYNOS_PMU select EXYNOS_SROM if PM select HAVE_ARM_SCU if SMP select HAVE_S3C2410_I2C if I2C diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 2d58063..34d29df 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -9,9 +9,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree) # Core -obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o \ - exynos3250-pmu.o exynos4-pmu.o \ - exynos5250-pmu.o exynos5420-pmu.o +obj-$(CONFIG_ARCH_EXYNOS) += exynos.o exynos-smc.o firmware.o obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o obj-$(CONFIG_PM_SLEEP) += suspend.o diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index 2833b5b..f545d6c 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -10,4 +10,8 @@ config EXYNOS_SROM bool depends on ARM && ARCH_EXYNOS && PM +config EXYNOS_PMU + bool + depends on ARCH_EXYNOS + endmenu diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 9c554d5..26fb489 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile @@ -1 +1,5 @@ obj-$(CONFIG_EXYNOS_SROM) += exynos-srom.o +ifdef CONFIG_ARM +obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o exynos3250-pmu.o exynos4-pmu.o \ + exynos5250-pmu.o exynos5420-pmu.o +endif