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: 5256671 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B07D29F2F1 for ; Sat, 8 Nov 2014 13:23:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEFD120149 for ; Sat, 8 Nov 2014 13:23:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E363620138 for ; Sat, 8 Nov 2014 13:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753795AbaKHNWo (ORCPT ); Sat, 8 Nov 2014 08:22:44 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:41176 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753714AbaKHNWn (ORCPT ); Sat, 8 Nov 2014 08:22:43 -0500 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>; 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 Cc: kgene.kim@samsung.com, linux-kernel@vger.kernel.org, s.nawrocki@samsung.com, lee.jones@linaro.org, Amit Daniel Kachhap , Pankaj Dubey 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+xCjAwajEw3ujJTZE iDWxrLgy9xCjKdCGicxSosn5wEj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Xd0atMnvVSZf 26xtLDqswdHf1pTk9gdG8wbO01lZ+Tl1w5z3THG105VYijMSDbWYi4oTAbpcqmq2AgAA 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=-6.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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