From patchwork Fri Mar 15 14:27:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2278281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 71CEB4020C for ; Fri, 15 Mar 2013 14:32:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGVdK-0007gD-Av; Fri, 15 Mar 2013 14:29:22 +0000 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGVbS-0006y9-A2 for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2013 14:27:27 +0000 Received: by mail-we0-f171.google.com with SMTP id u54so3313725wey.16 for ; Fri, 15 Mar 2013 07:27:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=kNhjnHy1nRg9G/2ELEJvtgKNsmbk5sYHUDv+wDn0PLA=; b=Fba7r/iDdLgF5zmsBxLE2LcppcT0Ksed9tl6AFOggsORBg62qQhJ5mJNlM53ZKKHtM m7zJzzm3STxxQg12OATVLMqmblGSpy9cxotU1VE+3rs6wDOuIEy7+0rSeYlNXA41Q8ve hAHhhDLomBlydhPEYv0xke33hY+UAeFuR8cOtGIjm/jAuHi3LgsjxyT2UtcUSwhb4yVf C2Lgsl3hCEsW1iLRIQYz8a83qvaCdgPT+eEgXRHwVDZkkdlGhfiTcy+rS32K0W+n6PHM M51yuwYcPlvzumZmUigt2AZtAE4AudOqihLS8YlGhraLjL8ZIyqTDWX8bHKaLutreZdm wy+w== X-Received: by 10.194.173.167 with SMTP id bl7mr11305335wjc.50.1363357644234; Fri, 15 Mar 2013 07:27:24 -0700 (PDT) Received: from mai.home (AToulouse-654-1-276-229.w90-5.abo.wanadoo.fr. [90.5.59.229]) by mx.google.com with ESMTPS id fv2sm3486696wib.6.2013.03.15.07.27.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 07:27:23 -0700 (PDT) From: Daniel Lezcano To: linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [RFC patch 04/11] cpuidle / omap3 : use common ARM cpuidle driver Date: Fri, 15 Mar 2013 15:27:03 +0100 Message-Id: <1363357630-22214-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363357630-22214-1-git-send-email-daniel.lezcano@linaro.org> References: <1363357630-22214-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQn5AVILOaAuVOL+/UoAHD+J15WpEC/t7sPuonB7Ctk7MCrFpvVXP+LG+TTRVPdGvH6i/pwE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130315_102726_487960_DDE707D5 X-CRM114-Status: GOOD ( 13.34 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: andrew@lunn.ch, magnus.damm@gmail.com, ben-linux@fluff.org, nsekhar@ti.com, nicolas.ferre@atmel.com, rob.herring@calxeda.com, rjw@sisk.pl, kevin.hilman@linaro.org, horms@verge.net.au, kernel@pengutronix.de, kgene.kim@samsung.com, plagnioj@jcrosoft.com, linux@maxim.org.za, jason@lakedaemon.net, lenb@kernel.org 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 Signed-off-by: Daniel Lezcano --- arch/arm/mach-omap2/cpuidle34xx.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 80392fc..0112da3c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "powerdomain.h" #include "clockdomain.h" @@ -271,8 +272,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, return ret; } -static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); - static struct cpuidle_driver omap3_idle_driver = { .name = "omap3_idle", .owner = THIS_MODULE, @@ -348,8 +347,6 @@ static struct cpuidle_driver omap3_idle_driver = { */ int __init omap3_idle_init(void) { - struct cpuidle_device *dev; - mpu_pd = pwrdm_lookup("mpu_pwrdm"); core_pd = pwrdm_lookup("core_pwrdm"); per_pd = pwrdm_lookup("per_pwrdm"); @@ -358,16 +355,5 @@ int __init omap3_idle_init(void) if (!mpu_pd || !core_pd || !per_pd || !cam_pd) return -ENODEV; - cpuidle_register_driver(&omap3_idle_driver); - - dev = &per_cpu(omap3_idle_dev, smp_processor_id()); - dev->cpu = 0; - - if (cpuidle_register_device(dev)) { - printk(KERN_ERR "%s: CPUidle register device failed\n", - __func__); - return -EIO; - } - - return 0; + return arm_idle_init(&omap3_idle_driver); }