From patchwork Wed Jun 26 10:15:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 2788201 Return-Path: X-Original-To: patchwork-linux-arm@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 AA485C0AB1 for ; Wed, 26 Jun 2013 20:15:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B260A201D3 for ; Wed, 26 Jun 2013 20:15:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF2E0201B3 for ; Wed, 26 Jun 2013 20:14:58 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urt8O-00069n-Op; Wed, 26 Jun 2013 17:03:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urt2J-0000nL-F9; Wed, 26 Jun 2013 16:57:39 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urs7L-00037P-H9 for linux-arm-kernel@merlin.infradead.org; Wed, 26 Jun 2013 15:58:47 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urmmp-0005y7-7P for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2013 10:17:16 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOZ00KSZWK7BDW0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2013 19:16:55 +0900 (KST) X-AuditID: cbfee61a-b7f3b6d000006edd-59-51cabf973833 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E0.2E.28381.79FBAC15; Wed, 26 Jun 2013 19:16:55 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MOZ008XEWIOKP80@mmp2.samsung.com>; Wed, 26 Jun 2013 19:16:55 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/8] ARM: shmobile: move cpuidle driver to drivers/cpuidle/ Date: Wed, 26 Jun 2013 12:15:45 +0200 Message-id: <1372241747-21083-7-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1372241747-21083-1-git-send-email-b.zolnierkie@samsung.com> References: <1372241747-21083-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoO70/acCDc6eELXYOGM9q8WkdQeY LOZ9lrVo3vqV0WLV1J0sFr0LrrJZ3FnBbHG26Q27xZQ/y5ksNj2+xmrxufcIo8XyFU+ZLR6s fstm8e1yM7vF/t4NTBbrHr5gsuhf2Mtk8XTdEmaLW1ua2CxeHWxjsdh/xctB1GPBr60sHt++ TmLxuP7qP5PH31UvmD12zrrL7vHqwh0WjzvX9rB5bF5S7zHx9jQWj/6/Bh59W1Yxejxa3MLo 8X3pGnaP4ze2M3nM+fmNxePzJrkAwSgum5TUnMyy1CJ9uwSujHdt6xkLnstX3L65nbmB8b1U FyMnh4SAicTKWQ+ZIWwxiQv31rN1MXJxCAlMZ5S4evYaK4TTxSTROusvWBWbgJXExPZVjCC2 iICGxJSux+wgNrPAPWaJfR9zQWxhAW+JCa0TWUFsFgFVic3T14D18gp4SDz99JcRYpu8xNP7 fWwgNqeAp8TcmUvBbCGgmqVrlzJOYORdwMiwilE0tSC5oDgpPddQrzgxt7g0L10vOT93EyM4 jp5J7WBc2WBxiFGAg1GJh1dh68lAIdbEsuLK3EOMEhzMSiK8b+afChTiTUmsrEotyo8vKs1J LT7EKM3BoiTOe6DVOlBIID2xJDU7NbUgtQgmy8TBKdXAqP+qNK563xqOrfuMTU/K7fkvyrz0 93aZGxpaTCE7Z/v5C3m/OiNltSze/17FKwblEpOYJ5ERUz4WfddOb57Xs9q8aM78ltnbX81i +fLiyjypa5pMYcvXvvHoSww/Ie44j7/k3ZWAVyeiF/rb1NoU5ueunchYeibdsz77pP+TCJHn cwz3r/m4QYmlOCPRUIu5qDgRAOtzgxKfAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130626_111715_619192_CC4FEFBC X-CRM114-Status: GOOD ( 16.39 ) X-Spam-Score: -8.2 (--------) Cc: rjw@sisk.pl, kgene.kim@samsung.com, magnus.damm@gmail.com, ben-linux@fluff.org, linux-pm@vger.kernel.org, khilman@deeprootsystems.com, nsekhar@ti.com, linus.walleij@linaro.org, swarren@wwwdotorg.org, nicolas.ferre@atmel.com, daniel.lezcano@linaro.org, tony@atomide.com, kyungmin.park@samsung.com, horms@verge.net.au, srinidhi.kasagar@stericsson.com, kernel@pengutronix.de, shawn.guo@linaro.org, plagnioj@jcrosoft.com, linux@maxim.org.za, b.zolnierkie@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 While at it: - replace by one Compile tested only. Cc: Simon Horman Cc: Magnus Damm Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Signed-off-by: Kyungmin Park Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-shmobile/Makefile | 1 - arch/arm/mach-shmobile/cpuidle.c | 37 ------------------------------------- drivers/cpuidle/Makefile | 3 +++ drivers/cpuidle/cpuidle-shmobile.c | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 38 deletions(-) delete mode 100644 arch/arm/mach-shmobile/cpuidle.c create mode 100644 drivers/cpuidle/cpuidle-shmobile.c diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 6165a51..cc84ef2 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -27,7 +27,6 @@ obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o # PM objects obj-$(CONFIG_SUSPEND) += suspend.o -obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ARCH_SHMOBILE) += pm-rmobile.o obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c deleted file mode 100644 index 0afeb5c..0000000 --- a/arch/arm/mach-shmobile/cpuidle.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CPUIdle support code for SH-Mobile ARM - * - * Copyright (C) 2011 Magnus Damm - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include - -static struct cpuidle_driver shmobile_cpuidle_default_driver = { - .name = "shmobile_cpuidle", - .owner = THIS_MODULE, - .states[0] = ARM_CPUIDLE_WFI_STATE, - .safe_state_index = 0, /* C1 */ - .state_count = 1, -}; - -static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver; - -void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) -{ - cpuidle_drv = drv; -} - -int __init shmobile_cpuidle_init(void) -{ - return cpuidle_register(cpuidle_drv, NULL); -} diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile index eed221e..758d0d9 100644 --- a/drivers/cpuidle/Makefile +++ b/drivers/cpuidle/Makefile @@ -34,4 +34,7 @@ endif ifeq ($(CONFIG_ARCH_S3C64XX),y) obj-y += cpuidle-s3c64xx.o endif +ifeq ($(CONFIG_ARCH_SHMOBILE),y) + obj-y += cpuidle-shmobile.o +endif obj-$(CONFIG_CPU_IDLE_ZYNQ) += cpuidle-zynq.o diff --git a/drivers/cpuidle/cpuidle-shmobile.c b/drivers/cpuidle/cpuidle-shmobile.c new file mode 100644 index 0000000..5cea47e --- /dev/null +++ b/drivers/cpuidle/cpuidle-shmobile.c @@ -0,0 +1,37 @@ +/* + * CPUIdle support code for SH-Mobile ARM + * + * Copyright (C) 2011 Magnus Damm + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include + +static struct cpuidle_driver shmobile_cpuidle_default_driver = { + .name = "shmobile_cpuidle", + .owner = THIS_MODULE, + .states[0] = ARM_CPUIDLE_WFI_STATE, + .safe_state_index = 0, /* C1 */ + .state_count = 1, +}; + +static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver; + +void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) +{ + cpuidle_drv = drv; +} + +int __init shmobile_cpuidle_init(void) +{ + return cpuidle_register(cpuidle_drv, NULL); +}