From patchwork Sat May 10 06:56:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4146711 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 51FCA9F387 for ; Sat, 10 May 2014 06:39:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 812AB2017E for ; Sat, 10 May 2014 06:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8FEC2028D for ; Sat, 10 May 2014 06:38:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754624AbaEJGig (ORCPT ); Sat, 10 May 2014 02:38:36 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:25984 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754164AbaEJGia (ORCPT ); Sat, 10 May 2014 02:38:30 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5C006QHIG5OAA0@mailout3.samsung.com>; Sat, 10 May 2014 15:38:29 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 1C.B1.18501.569CD635; Sat, 10 May 2014 15:38:29 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-07-536dc965ea14 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C0.A4.27725.569CD635; Sat, 10 May 2014 15:38:29 +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 <0N5C00GCSIFT5B30@mmp2.samsung.com>; Sat, 10 May 2014 15:38:29 +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, Pankaj Dubey Subject: [PATCH v4 11/11] ARM: EXYNOS: Move PMU specific definitions from common.h Date: Sat, 10 May 2014 15:56:38 +0900 Message-id: <1399704998-13321-12-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399704998-13321-1-git-send-email-pankaj.dubey@samsung.com> References: <1399704998-13321-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRmVeSWpSXmKPExsVy+t8zI93Uk7nBBnc6BC2WTbrLZtG74Cqb xabH11gtLu+aw2Yx4/w+Jovbl3ktFm39wm6xfsZrFoubz7YzWexoWc3iwOXR0tzD5rF5Sb1H 35ZVjB6fN8kFsERx2aSk5mSWpRbp2yVwZdyYvZyx4JF4Ref11YwNjG+Fuxg5OSQETCQ2f+5n hrDFJC7cW8/WxcjFISSwjFFiyt4udpiil10XoRLTGSWWzdvGAuG0MUl8eHqLCaSKTUBX4sn7 uWCjRASyJa403mcGKWIW2M0o0dg4jw0kISwQInFg2kRWEJtFQFWia+kSsAZeAU+Jpd1HgaZy AK1TkJgzyQYkzAkU/vp1Mdh8IQEPiQfdS8FmSgisYpf4fKqJHWKOgMS3yYegemUlNh2AekdS 4uCKGywTGIUXMDKsYhRNLUguKE5KLzLUK07MLS7NS9dLzs/dxAgJ/N4djLcPWB9iTAYaN5FZ SjQ5Hxg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2g908s175Nh6rezq L//tBy5VXdIyW7Hi17efN1n6HXjT2Uuqmk8V6mn/3ljikeo1ba728bz/mcUy15RYijMSDbWY i4oTASjW5zfvAgAA 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: Young-Gun 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/exynos-pmu.h | 31 +++++++++++++++++++++++++++++++ arch/arm/mach-exynos/pm.c | 1 + arch/arm/mach-exynos/pmu.c | 2 +- 4 files changed, 33 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 58b2b5d..abcb074 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -37,24 +37,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 (-1U) - -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 void exynos_enter_aftr(void); extern struct regmap *get_exynos_pmuregmap(void); diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h new file mode 100644 index 0000000..16ff036 --- /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 (-1U) + +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 ee427d7..a7a1b7f 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -38,6 +38,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 6a7fa8e..50c33c9 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" struct exynos_pmu_data {