From patchwork Fri Dec 18 03:32:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 7879711 Return-Path: X-Original-To: patchwork-linux-pm@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 D10D6BEEE5 for ; Fri, 18 Dec 2015 03:37:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E22362045E for ; Fri, 18 Dec 2015 03:37:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2DE020456 for ; Fri, 18 Dec 2015 03:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966081AbbLRDhO (ORCPT ); Thu, 17 Dec 2015 22:37:14 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:59041 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933470AbbLRDg6 (ORCPT ); Thu, 17 Dec 2015 22:36:58 -0500 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZJ02J99BDLPQ00@mailout4.samsung.com>; Fri, 18 Dec 2015 12:36:57 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.122]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 0F.EB.04886.95F73765; Fri, 18 Dec 2015 12:36:57 +0900 (KST) X-AuditID: cbfee690-f79646d000001316-11-56737f599601 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 3C.61.09068.85F73765; Fri, 18 Dec 2015 12:36:57 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZJ001T4BB8PW20@mmp2.samsung.com>; Fri, 18 Dec 2015 12:36:56 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: kgene.kim@samsung.com, k.kozlowski@samsung.com, thomas.ab@samsung.com, amitdanielk@gmail.com, olof@lixom.net, khilman@linaro.org, arnd@arndb.de, Pankaj Dubey Subject: [PATCH v7 6/6] drivers: soc: Add support for Exynos PMU driver Date: Fri, 18 Dec 2015 09:02:16 +0530 Message-id: <1450409536-30463-7-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.4.5 In-reply-to: <1450409536-30463-1-git-send-email-pankaj.dubey@samsung.com> References: <1450409536-30463-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRmVeSWpSXmKPExsWyRsSkSjeyvjjM4P4bfouPq1+yWfyddIzd 4vULQ4veBVfZLL4eXsFosenxNVaLy7vmsFl87j3CaDHj/D4mi1PXP7NZLNr6hd2iYxmjA4/H 71+TGD12zrrL7nHn2h42j81L6j2unGhi9ejbsorR4/MmuQD2KC6blNSczLLUIn27BK6MJ1Oe shU8Vq+Y0XSHuYHxj2IXIyeHhICJxP+dU9kgbDGJC/fWA9lcHEICKxglbi+fxQJT9PnOMnaI xCxGibMXprBAOK1MEg++vmMCqWIT0JV48n4uM0hCRKCVUWLZ/v9MIA6zwAFGiR3rXjGCVAkL uEucuTiFGcRmEVCV+PV+OiuIzSvgIbF77yGgOAfQPjmJpc21IGFOAU+JObvegC0QAio5/6KP FWSmhMAldolvp3eyQMwRkPg2+RALRK+sxKYDzBBnS0ocXHGDZQKj8AJGhlWMoqkFyQXFSelF JnrFibnFpXnpesn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wTjXdVXh2 k1f8c9F3Enq1IRdkplpOvPnl5SyOOf2nI9rTv20zvBy6Pbfq1fT5dZNffVi+cb771cBGua+m /7dZvJjr+X/HD8agtiKFN3GrT68z9cxW0dJKvHRILlQ54qf1x+0Pu+9vmzC5N7jkskACb1RP nP08yYkmXN0Phc2vT+jK2//pjpx7mBJLcUaioRZzUXEiAHIV5KPdAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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: Amit Daniel Kachhap Signed-off-by: Pankaj Dubey Reviewed-by: Krzysztof Kozlowski [for testing on Trats2 (Exynos4412) and Odroid XU3 (Exynos5422)] Tested-by: Krzysztof Kozlowski [for testing on Peach-Pi (Exynos5880)] Tested-by: Pankaj Dubey --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/Makefile | 4 +--- drivers/soc/samsung/Kconfig | 4 ++++ drivers/soc/samsung/Makefile | 2 ++ 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, 8 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 782ed7d..57f0ba8 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 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 ea4bc2a..895f169 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -10,4 +10,8 @@ config EXYNOS_SROM bool depends on ARM && ARCH_EXYNOS +config EXYNOS_PMU + bool + depends on ARM && ARCH_EXYNOS + endmenu diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 9c554d5..cef7970 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile @@ -1 +1,3 @@ obj-$(CONFIG_EXYNOS_SROM) += exynos-srom.o +obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o exynos3250-pmu.o exynos4-pmu.o \ + exynos5250-pmu.o exynos5420-pmu.o