From patchwork Mon May 7 21:16:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Lee X-Patchwork-Id: 157472 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 92510B6FA9 for ; Tue, 8 May 2012 07:19:28 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SRVJ3-0006pD-9M; Mon, 07 May 2012 21:17:21 +0000 Received: from mail-yx0-f177.google.com ([209.85.213.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SRVIm-0006nO-CL for linux-arm-kernel@lists.infradead.org; Mon, 07 May 2012 21:17:05 +0000 Received: by yenr9 with SMTP id r9so2460828yen.36 for ; Mon, 07 May 2012 14:17:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=GcpWks7LB+rHIbrRbe9ZEPog7mLdC+LVzpIMjuh+aTo=; b=WQ3lYsFrjLl31uRL9BUqLNAzL3/ULXXT5XMppT3kS/WTfCVBmZFRO8iwBXENfYVQ1Y qz7HZF95izf4MsOB4ybW5acacEhK/p9YiQ7ZE9H/zjhMXEcLpikFcEd5BKEwNUpz3Kzk itzzaJcBbySt7aAGhFQfLmMxzAgTSzgqipsJ++hOQmiDQDGwCrHqNymqLa1M9vdzo4l0 CTmYxZXNLQu2C8AXZz0d43+ThNnAhv6ZMlw0Mrsg7GnxGC9np6FuP+i0qFWCBzTj2mGU yklfub5vlp6xgLOzo8SqXdeSv7jAnbz4SSBrpiJG4gU4qDfQTVX4vDSwGqs7dYBdVa2B dDzQ== Received: by 10.42.153.10 with SMTP id k10mr701426icw.24.1336425421698; Mon, 07 May 2012 14:17:01 -0700 (PDT) Received: from localhost.localdomain ([216.59.27.36]) by mx.google.com with ESMTPS id kn9sm6940883igc.8.2012.05.07.14.16.59 (version=SSLv3 cipher=OTHER); Mon, 07 May 2012 14:17:01 -0700 (PDT) From: Robert Lee To: kernel@pengutronix.de Subject: [PATCH v3 3/3] ARM: imx: Add imx6q cpuidle driver Date: Mon, 7 May 2012 16:16:47 -0500 Message-Id: <1336425407-20308-4-git-send-email-rob.lee@linaro.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1336425407-20308-1-git-send-email-rob.lee@linaro.org> References: <1336425407-20308-1-git-send-email-rob.lee@linaro.org> X-Gm-Message-State: ALoCoQmgcc8XyXaKEb32WzBa7lHCyB2UUHpDftm8mXr0SRBX362Lb8Icv2TCG/Avro5hF45jiHXp X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linaro-dev@lists.linaro.org, patches@linaro.org, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, jj@chaosbits.net, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Add basic imx6q cpuidle driver. For now, only basic WFI state is supported. Deeper idle states will be added in the future. Signed-off-by: Robert Lee --- arch/arm/mach-imx/mach-imx6q.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index da6c1d9..4fc1fe7 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -10,7 +10,9 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include #include +#include #include #include #include @@ -21,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -28,8 +31,10 @@ #include #include #include +#include #include + void imx6q_restart(char mode, const char *cmd) { struct device_node *np; @@ -86,6 +91,19 @@ static void __init imx6q_init_machine(void) imx6q_pm_init(); } +static struct cpuidle_driver imx6q_cpuidle_driver = { + .name = "imx6q_cpuidle", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, + .states[0] = ARM_CPUIDLE_WFI_STATE, + .state_count = 1, +}; + +static void __init imx6q_init_late(void) +{ + imx_cpuidle_init(&imx6q_cpuidle_driver); +} + static void __init imx6q_map_io(void) { imx_lluart_map_io(); @@ -142,6 +160,7 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") .handle_irq = imx6q_handle_irq, .timer = &imx6q_timer, .init_machine = imx6q_init_machine, + .init_late = imx6q_init_late, .dt_compat = imx6q_dt_compat, .restart = imx6q_restart, MACHINE_END