From patchwork Wed Jun 26 10:13:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 2788811 Return-Path: X-Original-To: patchwork-linux-arm@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 4C7A79F245 for ; Wed, 26 Jun 2013 21:59:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FEA120200 for ; Wed, 26 Jun 2013 21:59:18 +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 E40B220210 for ; Wed, 26 Jun 2013 21:59:16 +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 1UrsNZ-0007xT-GF; Wed, 26 Jun 2013 16:15:33 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrsIP-0006qK-4e; Wed, 26 Jun 2013 16:10:13 +0000 Received: from bombadil.infradead.org ([2001:1868:205::9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urs2A-0005IC-1e for linux-arm-kernel@merlin.infradead.org; Wed, 26 Jun 2013 15:53:26 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urmkg-0007pV-1J for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2013 10:15:04 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOZ00F0AWFPO801@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2013 19:14:21 +0900 (KST) X-AuditID: cbfee61a-b7f3b6d000006edd-e9-51cabefd1faf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 65.5D.28381.DFEBAC15; Wed, 26 Jun 2013 19:14:21 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MOZ0076CWFFZO80@mmp1.samsung.com>; Wed, 26 Jun 2013 19:14:21 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: kgene.kim@samsung.com Subject: [PATCH 2/3] ARM: EXYNOS: init cpuidle driver in exynos_init_late() Date: Wed, 26 Jun 2013 12:13:46 +0200 Message-id: <1372241627-22695-3-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1372241627-22695-1-git-send-email-b.zolnierkie@samsung.com> References: <1372241627-22695-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrALMWRmVeSWpSXmKPExsVy+t9jAd2/+04FGrzap2ex5MEURouNM9az Wsz7LGsx8cM9RoveBVfZLM42vWG32PT4GqvF594jjBYzzu9jsnjz+wW7Rf/CXiaL9TNeszjw eKyZt4bR4861PWwem5fUe/RtWcXo8WhxC6PH501yAWxRXDYpqTmZZalF+nYJXBl7mr6yF3wS rnjWPYWtgbFHsIuRk0NCwETibut/dghbTOLCvfVsXYxcHEICixglOpp/MUE4XUwSp1asZQap YhOwkpjYvooRxBYRkJRoavgDFmcWWMIksXdrLYgtLOAtceHsOiYQm0VAVeJywyMwm1fAQ2LR zY3MENvkJZ7e72MDsTkFPCUWbVoAFhcCqllx5D3zBEbeBYwMqxhFUwuSC4qT0nMN9YoTc4tL 89L1kvNzNzGCw/GZ1A7GlQ0WhxgFOBiVeHgVtp4MFGJNLCuuzD3EKMHBrCTC+2b+qUAh3pTE yqrUovz4otKc1OJDjNIcLErivAdarQOFBNITS1KzU1MLUotgskwcnFINjCv+b/J6rZwX5HJ4 I88PtucWr7RNVx/z8M6qFKr+sUdl+ktPb4P5TfLX/5Qnm2t42J46LDKx9rLXlJsNBp3iGXvX fnjjP7e1Ol+tWqhVztzRyVXtY2qk1FUOsScH9nBKrNR2MbLJyzLc9GmaYrzP7JuyW+3N4q1/ nsxcwHFuf8bCL97Fq0ollViKMxINtZiLihMBjyvCP0MCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130626_031502_275256_05E1EA0D X-CRM114-Status: GOOD ( 11.26 ) X-Spam-Score: -6.3 (------) Cc: lorenzo.pieralisi@arm.com, linux-pm@vger.kernel.org, t.figa@samsung.com, daniel.lezcano@linaro.org, rjw@sisk.pl, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, amit.kachhap@linaro.org, jc.lee@samsung.com, linux-arm-kernel@lists.infradead.org, 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 Init cpuidle driver in exynos_init_late() instead of using device_initcall(). This is needed for multiplatform support. Tested on Exynos4210 (Universal C210 board). Cc: Jaecheol Lee Cc: Lorenzo Pieralisi Cc: Amit Daniel Kachhap Cc: Tomasz Figa Cc: Kukjin Kim Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Signed-off-by: Kyungmin Park Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/common.c | 8 ++++---- arch/arm/mach-exynos/common.h | 6 ++++++ arch/arm/mach-exynos/cpuidle.c | 3 +-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index f7e504b..1c78a16 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -346,11 +346,11 @@ void exynos5_restart(char mode, const char *cmd) void __init exynos_init_late(void) { - if (of_machine_is_compatible("samsung,exynos5440")) - /* to be supported later */ - return; + /* exynos5440 to be supported later */ + if (!of_machine_is_compatible("samsung,exynos5440")) + exynos_pm_late_initcall(); - exynos_pm_late_initcall(); + exynos4_init_cpuidle(); } #ifdef CONFIG_OF diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 11fc1e2..a3b95a6 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -40,6 +40,12 @@ int exynos_pm_late_initcall(void); static inline int exynos_pm_late_initcall(void) { return 0; } #endif +#ifdef CONFIG_CPU_IDLE +int exynos4_init_cpuidle(void); +#else +static inline int exynos4_init_cpuidle(void) { return 0; } +#endif + #ifdef CONFIG_ARCH_EXYNOS4 void exynos4_register_clocks(void); void exynos4_setup_clocks(void); diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 0a657ac..d6e5115 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -66,7 +66,7 @@ static void __init exynos5_core_down_clk(void) __raw_writel(tmp, EXYNOS5_PWR_CTRL2); } -static int __init exynos4_init_cpuidle(void) +int __init exynos4_init_cpuidle(void) { int cpu_id, ret; struct cpuidle_device *device; @@ -93,4 +93,3 @@ static int __init exynos4_init_cpuidle(void) return 0; } -device_initcall(exynos4_init_cpuidle);