From patchwork Sat Nov 8 13:16:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 5256721 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 C2D37C11AC for ; Sat, 8 Nov 2014 13:26:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D61C820145 for ; Sat, 8 Nov 2014 13:26:22 +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 E3FB62010C for ; Sat, 8 Nov 2014 13:26:21 +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 1Xn5zI-0006sR-Bp; Sat, 08 Nov 2014 13:23:32 +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 1Xn5yq-0006km-PK for linux-arm-kernel@lists.infradead.org; Sat, 08 Nov 2014 13:23:06 +0000 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEQ009PN2HTET30@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 08 Nov 2014 22:22:41 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id EA.0E.18167.0291E545; Sat, 08 Nov 2014 22:22:41 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-f2-545e1920f8db Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 32.38.09430.0291E545; Sat, 08 Nov 2014 22:22:40 +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 <0NEQ00B1K2HHL0A0@mmp2.samsung.com>; Sat, 08 Nov 2014 22:22:40 +0900 (KST) From: Amit Daniel Kachhap To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 2/6] drivers: soc: Add support for Exynos PMU driver Date: Sat, 08 Nov 2014 18:46:37 +0530 Message-id: <1415452601-13078-3-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1415452601-13078-1-git-send-email-amit.daniel@samsung.com> References: <1415452601-13078-1-git-send-email-amit.daniel@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsWyRsSkWldRMi7E4NAfRouGqyEWvQuuslnc /3qU0WLT42usFpd3zWGzmHF+H5PFoq1f2C0Ov2lndeDwuHNtD5vH5iX1Hn1bVjF6fN4kF8AS xWWTkpqTWZZapG+XwJVx+uEDpoK5MhXHOk+yNjBOFe9i5OSQEDCRmHD9CguELSZx4d56ti5G Lg4hgaWMEu0X57DDFB2beRgqMZ1R4sDRRiYIZwKTxMPZN9hAqtgEjCV+7twP1MHBISLgLbH8 miJIDbPAYUaJSUceM4PUCAu4S0y7vIcJxGYRUJW49aEfLM4LFL+yrhesV0JAQWLOJBuQMKeA h8SCvd1g1wkBlWx6+I8RZKaEwGR2iUe7P7NAzBGQ+Db5EAtEr6zEpgPMEEdLShxccYNlAqPw AkaGVYyiqQXJBcVJ6UUmesWJucWleel6yfm5mxiBIX7637MJOxjvHbA+xCjAwajE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FOy6fPV8gOdN4jqdG8Gu2CXNZp/3iYJurXd0atMnvVSZf 26xtLDqswdHf1pTk9gdG8wbO01lZ+Tl1w5z3THG105VYijMSDbWYi4oTAbpcqmq2AgAA 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-20141108_052305_008228_E382988A X-CRM114-Status: GOOD ( 10.49 ) X-Spam-Score: -5.6 (-----) Cc: kgene.kim@samsung.com, Pankaj Dubey , linux-kernel@vger.kernel.org, Amit Daniel Kachhap , s.nawrocki@samsung.com, lee.jones@linaro.org 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=-1.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_RHS_DOB 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 DT based implementation of PMU driver. This driver uses already existing DT binding information. Signed-off-by: Pankaj Dubey Signed-off-by: Amit Daniel Kachhap --- arch/arm/mach-exynos/Makefile | 2 +- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/samsung/Kconfig | 19 +++++++++++++++++++ drivers/soc/samsung/Makefile | 1 + .../pmu.c => drivers/soc/samsung/exynos-pmu.c | 0 6 files changed, 23 insertions(+), 1 deletion(-) 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%) 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/Makefile b/arch/arm/mach-exynos/Makefile index bcefb54..b91b382 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -9,7 +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 +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..90f33b9 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -3,5 +3,6 @@ menu "SOC (System On Chip) specific Drivers" source "drivers/soc/qcom/Kconfig" source "drivers/soc/ti/Kconfig" source "drivers/soc/versatile/Kconfig" +source "drivers/soc/samsung/Kconfig" endmenu diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index 063113d..44d220d 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_ARCH_QCOM) += qcom/ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_SOC_TI) += ti/ obj-$(CONFIG_PLAT_VERSATILE) += versatile/ +obj-$(CONFIG_ARCH_EXYNOS) += samsung/ diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig new file mode 100644 index 0000000..beb6dfc --- /dev/null +++ b/drivers/soc/samsung/Kconfig @@ -0,0 +1,19 @@ +# +# SAMSUNG SOC drivers +# +menuconfig SOC_SAMSUNG + bool "Samsung SOC drivers support" + +if SOC_SAMSUNG + +config MFD_EXYNOS_PMU + tristate "Support Exynos Power Management Unit" + depends on ARM || ARM64 + default y + help + Exynos SoC have Power Management Unit (PMU) which controls power and + operation state of Exynos SoC in two different ways. This driver + provides implementation of PMU driver and provides basic functionality + required during these operation state. + +endif #SOC_SAMSUNG diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile new file mode 100644 index 0000000..9d30f61 --- /dev/null +++ b/drivers/soc/samsung/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MFD_EXYNOS_PMU) += exynos-pmu.o