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: 18047 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A349525A2B for ; Fri, 21 Jun 2013 12:36:54 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf7266096ghr.5 for ; Fri, 21 Jun 2013 05:36:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=/ttxMJ1ZNxZadwsJxCbYvtRP+HsbrkhcG0Q/9Dlh4d0=; b=FEWDjVcY8dgAprGFY5wJ1zQN3ga6PNuBg9catiqOufqAiP+vsiF6dVkmRtOOup8Eca VnRjrPOzj0khWNGGuB6Ib+qhqGsoGxPlPgdyXNzKidhZKl//sFoElvnwvUM+9pnYbue5 4kENVOv/HJKvb/spp3MrkT2PRQbUHr1hfEewhszK4v9aBnIvMnWoN7keE1V9qnnNfzL+ mazTkeBj9XF/EzBeMOVU9w/c3P7nED6xSvdjN45QlBv/nzORyxr4Qg4vfvS8ViAv9MUR qZLYzrmUZZHYkx+6qpIKT7fRn4stC0j2xQpnVz7fV938x1QmSwfz/9nfWN2g3mMaDGvF i7Bw== X-Received: by 10.236.15.73 with SMTP id e49mr6797498yhe.15.1371818214235; Fri, 21 Jun 2013 05:36:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.194 with SMTP id k2ls991421qej.6.gmail; Fri, 21 Jun 2013 05:36:54 -0700 (PDT) X-Received: by 10.52.23.49 with SMTP id j17mr4772223vdf.56.1371818213941; Fri, 21 Jun 2013 05:36:53 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id xb6si1460193vdb.120.2013.06.21.05.36.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 05:36:53 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x14so5835350vbb.34 for ; Fri, 21 Jun 2013 05:36:53 -0700 (PDT) X-Received: by 10.58.187.232 with SMTP id fv8mr5687341vec.50.1371818213620; Fri, 21 Jun 2013 05:36:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp59835veb; Fri, 21 Jun 2013 05:36:53 -0700 (PDT) X-Received: by 10.194.83.195 with SMTP id s3mr9114248wjy.82.1371818212721; Fri, 21 Jun 2013 05:36:52 -0700 (PDT) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [2a00:1450:400c:c00::231]) by mx.google.com with ESMTPS id uu4si1871406wjc.89.2013.06.21.05.36.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 05:36:52 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::231 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c00::231; Received: by mail-wg0-f49.google.com with SMTP id a12so6616924wgh.16 for ; Fri, 21 Jun 2013 05:36:52 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org 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: ALoCoQmz+UXU9tH/XkR8RMSjmiiSMbK5IBNeyUC+viNRlQiIBqkfCPGPMl16R6MUWg6h9UH/dM0U X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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",