From patchwork Mon Jul 21 08:36:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 4593801 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 B8F9E9F462 for ; Mon, 21 Jul 2014 08:39:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06A8320120 for ; Mon, 21 Jul 2014 08:39:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA2B620127 for ; Mon, 21 Jul 2014 08:39:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X995r-00010o-DN; Mon, 21 Jul 2014 08:37:11 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X995h-0000tH-GR for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 08:37:02 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9100J8LZWUGH60@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 09:36:30 +0100 (BST) X-AuditID: cbfec7f5-b7f626d000004b39-b7-53ccd112c276 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id EB.B9.19257.211DCC35; Mon, 21 Jul 2014 09:36:34 +0100 (BST) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N9100JHAZWSKO40@eusync1.samsung.com>; Mon, 21 Jul 2014 09:36:34 +0100 (BST) From: Krzysztof Kozlowski To: Russell King , Kukjin Kim , "Rafael J. Wysocki" , Daniel Lezcano , Sachin Kamat , Tushar Behera , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 2/3] ARM: EXYNOS: Enable cpuidle in WFI on all SoCs Date: Mon, 21 Jul 2014 10:36:10 +0200 Message-id: <1405931771-24100-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1405931771-24100-1-git-send-email-k.kozlowski@samsung.com> References: <1405931771-24100-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrALMWRmVeSWpSXmKPExsVy+t/xy7pCF88EG6w9ZW2xccZ6Vot5n2Ut Xr8wtOhdcJXN4mzTG3aLTY+vsVpc3jWHzeJz7xFGixnn9zFZ3L7Ma7H2yF12izOnL7FaXLl0 is1i/YzXLBbtf/eyOfB7tDT3sHncubaHzWPzknqPLVfbWTz6tqxi9Pi8SS6ALYrLJiU1J7Ms tUjfLoEr4+v2k0wFT7kqPp/qYWxgfMbRxcjJISFgInFz0ypmCFtM4sK99WxdjFwcQgJLGSX2 bHzOCuH0MUns23iCCaSKTcBYYvPyJWBVIgJNzBKvlp9mA0kwCzxnlHj6PRzEFhZwlug8d5wF xGYRUJU4tf4IO4jNK+AusfDLKVaIdXISJ49NBrM5BTwkLp//DGYLAdWs+L+LZQIj7wJGhlWM oqmlyQXFSem5RnrFibnFpXnpesn5uZsYIaH6dQfj0mNWhxgFOBiVeHg5XpwKFmJNLCuuzD3E KMHBrCTCeyLjTLAQb0piZVVqUX58UWlOavEhRiYOTqkGRiEzk8zYo7tUNizZezGtakYef0SR UMr0EzsqDsav3HTswY6cv71HjOv+OX3NfLrM9/ExucMJmQw9PMY5zdoT/sZ1cz5S/jrnAPsG xsDJYUn/HTz8f5/VcHi//7lks5DG+fnt9x+u2b97hvK6Repb188V5HnMe/4HX+pSzp9HxDqX l068d/iS7B0lluKMREMt5qLiRACkpGSSMwIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_013701_699569_B449F245 X-CRM114-Status: GOOD ( 12.46 ) X-Spam-Score: -5.0 (-----) Cc: Krzysztof Kozlowski , Kyungmin Park , Bartlomiej Zolnierkiewicz , Tomasz Figa , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-1.9 required=5.0 tests=BAYES_00,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 Add cpuidle device for each SoC but set AFTR enter function only on supported ones (for now these are only Exynos4210 and Exynos5250). For other chipsets use only WFI. This actually does not give any special energy-saving benefits but allows to track the idle time of each core. Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/exynos.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 2a43a1734eca..4109d592f6fc 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -171,14 +171,20 @@ static void exynos_restart(enum reboot_mode mode, const char *cmd) static struct platform_device exynos_cpuidle = { .name = "exynos_cpuidle", - .dev.platform_data = exynos_enter_aftr, + /* + * Currently AFTR is not implemented for each SoC. + * Set this to exynos_enter_aftr() only for supported SoCs. + */ + .dev.platform_data = NULL, .id = -1, }; void __init exynos_cpuidle_init(void) { if (soc_is_exynos4210() || soc_is_exynos5250()) - platform_device_register(&exynos_cpuidle); + exynos_cpuidle.dev.platform_data = exynos_enter_aftr; + + platform_device_register(&exynos_cpuidle); } void __init exynos_cpufreq_init(void)