From patchwork Wed Jan 7 05:31:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 5582271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BAE709F357 for ; Wed, 7 Jan 2015 05:48:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15DFF2012D for ; Wed, 7 Jan 2015 05:48:30 +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 F06E8200CA for ; Wed, 7 Jan 2015 05:48:28 +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 1Y8jQs-0003nv-Us; Wed, 07 Jan 2015 05:45:27 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8jLK-0007HW-Mb for linux-arm-kernel@lists.infradead.org; Wed, 07 Jan 2015 05:39:45 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHS003JGL1KL3A0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 07 Jan 2015 14:39:20 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 1E.4C.17016.886CCA45; Wed, 07 Jan 2015 14:39:20 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-db-54acc688506e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 26.2C.09430.786CCA45; Wed, 07 Jan 2015 14:39:20 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NHS00LD2L0VL6E1@mmp2.samsung.com>; Wed, 07 Jan 2015 14:39:19 +0900 (KST) From: Pankaj Dubey To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] drivers: soc: Add support for Exynos PMU driver Date: Wed, 07 Jan 2015 11:01:28 +0530 Message-id: <1420608688-10459-7-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.2.0 In-reply-to: <1420608688-10459-1-git-send-email-pankaj.dubey@samsung.com> References: <1420608688-10459-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRmVeSWpSXmKPExsWyRsSkRrfj2JoQg8WPOSx2fuhmsmi4GmLx d9IxdouNM9azWvQ/fs1sMeXPciaLTY+vsVpc3jWHzWLG+X1MFrcv81os2vqF3eJ13xpmixvT W1gtOpYxOvB5tDT3sHn8/jWJ0eNyXy+Tx6ZVnWwed67tYfPYvKTeo7f5HZtH35ZVjB7Hb2xn 8vi8SS6AK4rLJiU1J7MstUjfLoEr49efpcwFawwq5h+cydTAOEWji5GTQ0LARKJx5TV2CFtM 4sK99WxdjFwcQgJLGSWenNnGAlPUcPM4I0RiOqPE+kVXmSGcCUwSh/79ZgapYhPQlXjyfi6Y LSKQLdF/ezULSBGzwE0mictHnwHN5eAQFnCXmHFIAMRkEVCVmN7EClLOK+Ahcf3BOVaIZXIS W249AruIU8BT4tnU/2BxIaCa3w0fGCFq3rJLvP8iC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MEB7OSCK9VJ1CINyWxsiq1 KD++qDQntfgQoynQUROZpUST84HpJK8k3tDYxNzU2NTSxMLEzFJJnFfJvi1ESCA9sSQ1OzW1 ILUIpo+Jg1OqgXFu+G7/vWEPNXoqVt0V6V02+eilzES5nu8r92TwrEk9pLeq2ikggX9baO5q Bf8g1tQr+TbvDlRN/j85fVKqB5PLmV7lGsOixTm7H5UyesVbMe6xNTnAY5T/7X9/J/vsbN7V Ww5PD+c58k7JrOD2ux8bF0XtM925We3CaT6ucI412WtMVjed9VBiKc5INNRiLipOBABGv0Wa 7wIAAA== 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-20150106_213942_968416_09ADD07E X-CRM114-Status: GOOD ( 13.44 ) X-Spam-Score: -5.0 (-----) Cc: linux@arm.linux.org.uk, arnd@arndb.de, b.zolnierkie@samsung.com, Pankaj Dubey , Linus Walleij , amit.daniel@samsung.com, kgene@kernel.org, Santosh Shilimkar , thomas.ab@samsung.com, Andy Gross , Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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. CC: Linus Walleij CC: Stephen Warren CC: Andy Gross CC: Santosh Shilimkar 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/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/samsung/Kconfig | 20 ++++++++++++++++++++ drivers/soc/samsung/Makefile | 4 ++++ .../pmu.c => drivers/soc/samsung/exynos-pmu.c | 0 .../mach-exynos => drivers/soc/samsung}/exynos-pmu.h | 0 .../soc/samsung}/exynos3250-pmu.c | 0 .../soc/samsung}/exynos4-pmu.c | 0 .../soc/samsung}/exynos5250-pmu.c | 0 .../soc/samsung}/exynos5420-pmu.c | 0 12 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 drivers/soc/samsung/Kconfig create mode 100644 drivers/soc/samsung/Makefile 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 603820e..2e00b75 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -25,6 +25,7 @@ menuconfig ARCH_EXYNOS select S5P_DEV_MFC select SRAM select MFD_SYSCON + select SOC_SAMSUNG help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 462df1b..b91b382 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/Kconfig b/drivers/soc/Kconfig index 76d6bd4..c3abfbe 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -1,6 +1,7 @@ menu "SOC (System On Chip) specific Drivers" source "drivers/soc/qcom/Kconfig" +source "drivers/soc/samsung/Kconfig" source "drivers/soc/ti/Kconfig" source "drivers/soc/versatile/Kconfig" diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index 063113d..620366f 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -3,6 +3,7 @@ # obj-$(CONFIG_ARCH_QCOM) += qcom/ +obj-$(CONFIG_SOC_SAMSUNG) += samsung/ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_SOC_TI) += ti/ obj-$(CONFIG_PLAT_VERSATILE) += versatile/ diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig new file mode 100644 index 0000000..6855cc4 --- /dev/null +++ b/drivers/soc/samsung/Kconfig @@ -0,0 +1,20 @@ +# +# SAMSUNG SOC drivers +# +menu "Samsung SOC drivers support" + +config SOC_SAMSUNG + bool + +config EXYNOS_PMU + bool "Support Exynos Power Management Unit" + depends on ARCH_EXYNOS + default y + help + Exynos SoC have Power Management Unit (PMU) which controls power and + operation state of various components in Exynos SoC. This driver + provides implementation of PMU driver and provides various + functionality like initialisation and transition to various low power + states. + +endmenu diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile new file mode 100644 index 0000000..d746a1d --- /dev/null +++ b/drivers/soc/samsung/Makefile @@ -0,0 +1,4 @@ +ifdef CONFIG_ARM +obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o exynos3250-pmu.o exynos4-pmu.o \ + exynos5250-pmu.o exynos5420-pmu.o +endif