From patchwork Mon May 21 22:50:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob X-Patchwork-Id: 8849 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 248D723EB5 for ; Mon, 21 May 2012 22:50:57 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id DB672A18C12 for ; Mon, 21 May 2012 22:50:56 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so6033519ggn.11 for ; Mon, 21 May 2012 15:50:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=GcpWks7LB+rHIbrRbe9ZEPog7mLdC+LVzpIMjuh+aTo=; b=iHffhUFHuV1q9huoDDPFxSCHuWmAt0X5/1M+uHhtQBQbrdeRggyyZE+5429EnpJXNv FogM0fPywONhi0j06pZwmzKclInA1yZFAWYUVygWhprz8V1nxaKx1q3q1aU0nSCkVhIG ygRl8mC1GvkluQ/zbt0t+mYOia1/7eWk+7Vir/Ml4qyJ78CILu2UfiZ4VnXD/U9k3/2i hc8vmFPmrsG4E6qTIK1sOAkpkrlxLkoy16i/RDYKajSGJbL3CcgbzvEX2PoTM1glbzpF msH61FwSN/wKNPXL39PMoyYJiTZopINv9+QUKbQhej62jnc8t3DNPiPBBiZTEXi2b/dc r/HQ== Received: by 10.50.87.227 with SMTP id bb3mr7890784igb.57.1337640656595; Mon, 21 May 2012 15:50:56 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp324883ibd; Mon, 21 May 2012 15:50:55 -0700 (PDT) Received: by 10.236.184.102 with SMTP id r66mr24569781yhm.46.1337640655601; Mon, 21 May 2012 15:50:55 -0700 (PDT) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id z10si17838192yhn.70.2012.05.21.15.50.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 May 2012 15:50:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) smtp.mail=rob.lee@linaro.org Received: by ghbf1 with SMTP id f1so710522ghb.37 for ; Mon, 21 May 2012 15:50:55 -0700 (PDT) Received: by 10.50.187.169 with SMTP id ft9mr8064518igc.59.1337640654930; Mon, 21 May 2012 15:50:54 -0700 (PDT) Received: from localhost.localdomain ([216.59.27.6]) by mx.google.com with ESMTPS id dk9sm8682082igb.13.2012.05.21.15.50.52 (version=SSLv3 cipher=OTHER); Mon, 21 May 2012 15:50:53 -0700 (PDT) From: Robert Lee To: kernel@pengutronix.de Cc: shawn.guo@linaro.org, u.kleine-koenig@pengutronix.de, richard.zhao@freescale.com, amit.kucheria@linaro.org, daniel.lezcano@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, patches@linaro.org, jj@chaosbits.net Subject: [PATCH v5 7/7] ARM: imx: Add imx6q cpuidle driver Date: Mon, 21 May 2012 17:50:30 -0500 Message-Id: <1337640630-29176-8-git-send-email-rob.lee@linaro.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1337640630-29176-1-git-send-email-rob.lee@linaro.org> References: <1337640630-29176-1-git-send-email-rob.lee@linaro.org> X-Gm-Message-State: ALoCoQmgttV9tt6Pf0eCpB6ofEWlqMsbY1QOCIa/2gt6jfUPXtozts0LYJ/gFT8cgtYGUBvi2n5F 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