From patchwork Fri Jun 21 12:36:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2762021 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 385509F756 for ; Fri, 21 Jun 2013 12:50:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D39C520213 for ; Fri, 21 Jun 2013 12:50:19 +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 A07D120204 for ; Fri, 21 Jun 2013 12:50:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uq0bS-0002JT-80; Fri, 21 Jun 2013 12:38:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uq0af-00018l-Kw; Fri, 21 Jun 2013 12:37:21 +0000 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uq0ac-00017h-Ed for linux-arm-kernel@lists.infradead.org; Fri, 21 Jun 2013 12:37:19 +0000 Received: by mail-we0-f180.google.com with SMTP id w56so6362631wes.39 for ; Fri, 21 Jun 2013 05:36:52 -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:x-gm-message-state; bh=/ttxMJ1ZNxZadwsJxCbYvtRP+HsbrkhcG0Q/9Dlh4d0=; b=kCwrBDIySYOCodDsBJiPupyughH+mmKhfMOlrv32zJUcj2OZtxbdZk1vcQwNCv/zN5 +YafLsqM4vx+970WI3TA5fiCyf1atnJiswMI2lh5oimPtmrlWUqsLYuxw6F6bIC03Iy5 Kc8Sy4lb3qlgbrgJTT55bMR8ukfDOpmBD+5Ehlbe+XIUJMCp96KHADKIwJhB7nvhGFnV rIyWXJ66DMAmI0GB4Dw27C7a31TgdgmlN6DvpjQPAYMqMTym/QeOmnb1rcGutNJC8tjb eEKIUZiQnuBpTmlFXTWCiMdC1Tc6DOsL1F51pSYtn66oCyS5EIU1HiWGsJq8gYiweYpN 8yEg== X-Received: by 10.180.83.200 with SMTP id s8mr2598877wiy.48.1371818212168; Fri, 21 Jun 2013 05:36:52 -0700 (PDT) Received: from mai.home (AToulouse-654-1-332-21.w86-199.abo.wanadoo.fr. [86.199.219.21]) by mx.google.com with ESMTPSA id x13sm7018149wib.3.2013.06.21.05.36.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 05:36:50 -0700 (PDT) From: Daniel Lezcano To: linux@maxim.org.za, nicolas.ferre@atmel.com, plagnioj@jcrosoft.com Subject: [PATCH] at91: cpuidle: Fix target_residency Date: Fri, 21 Jun 2013 14:36:59 +0200 Message-Id: <1371818219-13060-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlbPqRsPViCDqRteOYvyrM2/N0Q63Dvs57uu3meNlYWcnwDftS9i/M2l3Cna8bANcLz31DU X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130621_083718_636965_9D33A4FD X-CRM114-Status: GOOD ( 13.31 ) X-Spam-Score: -1.9 (-) Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.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 X-Spam-Status: No, score=-5.7 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 The following commit: commit 7e348b9012522fa0efd854d20d210d5e57fcedd1 Author: Robert Lee Date: Tue Mar 20 15:22:43 2012 -0500 ARM: at91: Consolidate time keeping and irq enable Enable core cpuidle timekeeping and irq enabling and remove that handling from this code. introduced a zero to the state1 (suspend) target residency. [ ... ] + .states[1] = { + .enter = at91_enter_idle, + .exit_latency = 10, + .target_residency = 100000, + .flags = CPUIDLE_FLAG_TIME_VALID, + .name = "RAM_SR", + .desc = "WFI and DDR Self Refresh", + }, [ ... ] - /* Wait for interrupt and RAM self refresh state */ - driver->states[1].enter = at91_enter_idle; - driver->states[1].exit_latency = 10; - driver->states[1].target_residency = 10000; - driver->states[1].flags = CPUIDLE_FLAG_TIME_VALID; - strcpy(driver->states[1].name, "RAM_SR"); - strcpy(driver->states[1].desc, "WFI and RAM Self Refresh"); [ ... ] The cpuidle never enters this state since this commit. Fix it by setting the value to 10ms again. Signed-off-by: Daniel Lezcano Acked-by: Nicolas Ferre --- arch/arm/mach-at91/cpuidle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index 69f9e3b..4ec6a6d 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c @@ -51,7 +51,7 @@ static struct cpuidle_driver at91_idle_driver = { .states[1] = { .enter = at91_enter_idle, .exit_latency = 10, - .target_residency = 100000, + .target_residency = 10000, .flags = CPUIDLE_FLAG_TIME_VALID, .name = "RAM_SR", .desc = "WFI and DDR Self Refresh",