From patchwork Mon Apr 28 12:20:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4077021 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 0F3F8BFF02 for ; Mon, 28 Apr 2014 12:03:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0885420263 for ; Mon, 28 Apr 2014 12:03:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 040D4201F7 for ; Mon, 28 Apr 2014 12:03:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755693AbaD1MCV (ORCPT ); Mon, 28 Apr 2014 08:02:21 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:45358 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755481AbaD1MCT (ORCPT ); Mon, 28 Apr 2014 08:02:19 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4Q00HARPFTC520@mailout4.samsung.com>; Mon, 28 Apr 2014 21:02:17 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id D9.AC.14563.9434E535; Mon, 28 Apr 2014 21:02:17 +0900 (KST) X-AuditID: cbfee68e-b7fd86d0000038e3-8b-535e4349287c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F6.0E.25708.8434E535; Mon, 28 Apr 2014 21:02:17 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4Q00CUIPFOY210@mmp2.samsung.com>; Mon, 28 Apr 2014 21:02:16 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, t.figa@samsung.com, chow.kim@samsung.com, yg1004.jang@samsung.com, vikas.sajjan@samsung.com, b.zolnierkie@samsung.com, Pankaj Dubey Subject: [RESUBMIT RFC PATCH v2 1/3] ARM: EXYNOS: Move PMU specific definitions from common.h Date: Mon, 28 Apr 2014 21:20:05 +0900 Message-id: <1398687607-4554-2-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398687607-4554-1-git-send-email-pankaj.dubey@samsung.com> References: <1398687607-4554-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeLIzCtJLcpLzFFi42I5/e+Zvq6nc1ywQd86TouNM9azWiybdJfN onfBVTaLTY+vsVpc3jWHzWLG+X1MFrcv81os2vqF3WL9jNcsFjefbWey2NGymsWB26OluYfN Y/OSeo++LasYPT5vkgtgieKySUnNySxLLdK3S+DKmHG1l6Vgo3TFv3nfWBoYv4p1MXJySAiY SHxfvoARwhaTuHBvPVsXIxeHkMAyRokfnVtYYIom7NzBDpGYzihx8ONCVginjUni37+lYO1s AroST97PZQaxRQSyJa403mcGKWIWuMoocfJlO1hCWCBe4tO5RWANLAKqEnsOnWAHsXkF3CXe Lj0AZHMArVOQmDPJBiTMKeAhsfriEzYQWwiopGPBNWaIi7axSzw5zQUxRkDi2+RDLBCtshKb DkCVSEocXHGDZQKj8AJGhlWMoqkFyQXFSelFRnrFibnFpXnpesn5uZsY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3XDnR/+mmk6ISLp f/4TSeH9eyX/66458NRXJTyg86mPc2iJt5jht1cflS48st66f9fTM/5dr2e+6rq486HthTlK LMUZiYZazEXFiQAKnjo49AIAAA== 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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Younggun Jang This patch moves PMU specific definitions into a new file as exynos-pmu.h. This will help in making PMU implementation independent of common.h header. Signed-off-by: Young-Gun Jang Signed-off-by: Pankaj Dubey --- arch/arm/mach-exynos/common.h | 17 ----------------- arch/arm/mach-exynos/cpuidle.c | 1 + arch/arm/mach-exynos/exynos-pmu.h | 31 +++++++++++++++++++++++++++++++ arch/arm/mach-exynos/pm.c | 1 + arch/arm/mach-exynos/pmu.c | 2 +- 5 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 arch/arm/mach-exynos/exynos-pmu.h diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index ad5128e..d848ede 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -38,24 +38,7 @@ extern struct smp_operations exynos_smp_ops; extern void exynos_cpu_die(unsigned int cpu); -/* PMU(Power Management Unit) support */ - -#define PMU_TABLE_END 0xFFFF - -enum sys_powerdown { - SYS_AFTR, - SYS_LPA, - SYS_SLEEP, - NUM_SYS_POWERDOWN, -}; - extern unsigned long l2x0_regs_phys; -struct exynos_pmu_conf { - unsigned int offset; - unsigned int val[NUM_SYS_POWERDOWN]; -}; - -extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); extern struct regmap *get_exynos_pmuregmap(void); extern void __iomem *get_exynos_pmuaddr(void); diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 5dcdd46..ff3be9c 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -32,6 +32,7 @@ #include "common.h" #include "regs-pmu.h" +#include "exynos-pmu.h" #define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h new file mode 100644 index 0000000..1cc857b --- /dev/null +++ b/arch/arm/mach-exynos/exynos-pmu.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Header for EXYNOS PMU Driver support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __EXYNOS_PMU_H +#define __EXYNOS_PMU_H + +#define PMU_TABLE_END 0xFFFF + +enum sys_powerdown { + SYS_AFTR, + SYS_LPA, + SYS_SLEEP, + NUM_SYS_POWERDOWN, +}; + +struct exynos_pmu_conf { + unsigned int offset; + unsigned int val[NUM_SYS_POWERDOWN]; +}; + +extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); + +#endif /* __EXYNOS_PMU_H */ diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index e4c10d4..103ab92 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -37,6 +37,7 @@ #include "common.h" #include "regs-pmu.h" #include "regs-sys.h" +#include "exynos-pmu.h" static struct regmap *pmu_regmap; diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index abcf753..d020557 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -16,7 +16,7 @@ #include #include -#include "common.h" +#include "exynos-pmu.h" #include "regs-pmu.h" enum exynos_pmu_id {