From patchwork Mon Nov 24 02:06:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 5362791 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 04F55C11AC for ; Mon, 24 Nov 2014 02:14:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2158820351 for ; Mon, 24 Nov 2014 02:14:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28050202F8 for ; Mon, 24 Nov 2014 02:14:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751839AbaKXCNw (ORCPT ); Sun, 23 Nov 2014 21:13:52 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:16495 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbaKXCMq (ORCPT ); Sun, 23 Nov 2014 21:12:46 -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 <0NFI0059FU58JS10@mailout3.samsung.com>; Mon, 24 Nov 2014 11:12:44 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id EA.76.18167.B1492745; Mon, 24 Nov 2014 11:12:43 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-84-5472941be1b4 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F1.D9.09430.B1492745; Mon, 24 Nov 2014 11:12:43 +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 <0NFI006X1U4PTKF0@mmp2.samsung.com>; Mon, 24 Nov 2014 11:12:43 +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, linux@arm.linux.org.uk, Amit Daniel Kachhap , Pankaj Dubey Subject: [PATCH v4 2/5] drivers: soc: Add support for Exynos PMU driver Date: Mon, 24 Nov 2014 07:36:12 +0530 Message-id: <1416794775-1605-3-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1416794775-1605-1-git-send-email-amit.daniel@samsung.com> References: <1416794775-1605-1-git-send-email-amit.daniel@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsWyRsSkRld6SlGIwdINBhYNV0MsehdcZbPY 9Pgaq8XlXXPYLGac38dkcfsyr8WirV/YHdg9Wpp72Dw2L6n36NuyitHj8ya5AJYoLpuU1JzM stQifbsErozj7/+xFlyTqdh34gFbA+N+8S5GTg4JAROJfd8bWSFsMYkL99azgdhCAksZJaac t4SpOXyhF6iGCyg+nVHi37tDLBDOBCaJXYvusoBUsQkYS/zcuZ+9i5GDQ0TAW2L5NUWQGmaB 1YwSfy5sZQKpERZwl5jY+YQZxGYRUJV4de4UI4jNK+AmsfnrJLBeCQEFiTmTbEDCnEDlzUfn M0Ic5Cax53sHE8hMCYHJ7BLPLu1igpgjIPFtMshBIL2yEpsOMEMcLSlxcMUNlgmMwgsYGVYx iqYWJBcUJ6UXmegVJ+YWl+al6yXn525iBAb16X/PJuxgvHfA+hCjAAejEg/vh9bCECHWxLLi ytxDjKZAGyYyS4km5wNjJ68k3tDYzMjC1MTU2Mjc0kx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2HIzq/5HxwuW33Y0qvEUpyRaKjFXFScCABF5VlssAIAAA== 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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. 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 | 20 ++++++++++++++++++++ drivers/soc/samsung/Makefile | 1 + .../pmu.c => drivers/soc/samsung/exynos-pmu.c | 0 6 files changed, 24 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..fcd7e37 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_SOC_SAMSUNG) += samsung/ 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..5a879c6 --- /dev/null +++ b/drivers/soc/samsung/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o