From patchwork Mon Feb 27 04:47:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob X-Patchwork-Id: 6944 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 7C69623E01 for ; Mon, 27 Feb 2012 04:48:11 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3EAD0A185EB for ; Mon, 27 Feb 2012 04:48:11 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so7824105iab.11 for ; Sun, 26 Feb 2012 20:48:11 -0800 (PST) Received: from mr.google.com ([10.42.131.129]) by 10.42.131.129 with SMTP id z1mr12152735ics.53.1330318091009 (num_hops = 1); Sun, 26 Feb 2012 20:48:11 -0800 (PST) Received: by 10.42.131.129 with SMTP id z1mr9851516ics.53.1330318090955; Sun, 26 Feb 2012 20:48:10 -0800 (PST) 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.11.10 with SMTP id r10csp57809ibr; Sun, 26 Feb 2012 20:48:10 -0800 (PST) Received: by 10.236.176.37 with SMTP id a25mr5034230yhm.90.1330318090335; Sun, 26 Feb 2012 20:48:10 -0800 (PST) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id k13si1185812anb.32.2012.02.26.20.48.10 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Feb 2012 20:48:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) smtp.mail=rob.lee@linaro.org Received: by mail-yw0-f50.google.com with SMTP id j63so982695yhj.37 for ; Sun, 26 Feb 2012 20:48:10 -0800 (PST) Received-SPF: pass (google.com: domain of rob.lee@linaro.org designates 10.236.184.6 as permitted sender) client-ip=10.236.184.6; Received: from mr.google.com ([10.236.184.6]) by 10.236.184.6 with SMTP id r6mr19014012yhm.82.1330318090177 (num_hops = 1); Sun, 26 Feb 2012 20:48:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.184.6 with SMTP id r6mr14167167yhm.82.1330318087586; Sun, 26 Feb 2012 20:48:07 -0800 (PST) Received: from b18647-20 ([67.23.168.6]) by mx.google.com with ESMTPS id w44sm35245363yhk.17.2012.02.26.20.48.05 (version=SSLv3 cipher=OTHER); Sun, 26 Feb 2012 20:48:07 -0800 (PST) From: Robert Lee To: len.brown@intel.com, khilman@ti.com Cc: robherring2@gmail.com, Baohua.Song@csr.com, amit.kucheria@linaro.org, nicolas.ferre@atmel.com, linux@maxim.org.za, kgene.kim@samsung.com, amit.kachhap@linaro.org, magnus.damm@gmail.com, nsekhar@ti.com, daniel.lezcano@linaro.org, mturquette@linaro.org, vincent.guittot@linaro.org, arnd.bergmann@linaro.org, linux-arm-kernel@lists.infradead.org, linaro-dev@lists.linaro.org, patches@linaro.org, deepthi@linux.vnet.ibm.com, broonie@opensource.wolfsonmicro.com, nicolas.pitre@linaro.org, linux@arm.linux.org.uk, jean.pihet@newoldbits.com Subject: [PATCH v5 5/9] ARM: shmobile: Consolidate cpuidle functionality Date: Sun, 26 Feb 2012 22:47:39 -0600 Message-Id: <1330318063-25460-6-git-send-email-rob.lee@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1330318063-25460-1-git-send-email-rob.lee@linaro.org> References: <1330318063-25460-1-git-send-email-rob.lee@linaro.org> X-Gm-Message-State: ALoCoQnltqwd9mzOFbgG4omyKjdBRyb7xHz+Oycw/ccGLj4JmMB9i0BiMuPRiPZ1UjnNErQMsWXb Use newly added core cpuidle functionality and remove this duplicated code from the platform cpuidle. Signed-off-by: Robert Lee --- arch/arm/mach-shmobile/cpuidle.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c index 1b23342..e01a73f 100644 --- a/arch/arm/mach-shmobile/cpuidle.c +++ b/arch/arm/mach-shmobile/cpuidle.c @@ -29,21 +29,8 @@ static int shmobile_cpuidle_enter(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - ktime_t before, after; - - before = ktime_get(); - - local_irq_disable(); - local_fiq_disable(); - shmobile_cpuidle_modes[index](); - local_irq_enable(); - local_fiq_enable(); - - after = ktime_get(); - dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10; - return index; } @@ -51,13 +38,8 @@ static struct cpuidle_device shmobile_cpuidle_dev; static struct cpuidle_driver shmobile_cpuidle_driver = { .name = "shmobile_cpuidle", .owner = THIS_MODULE, - .states[0] = { - .name = "C1", - .desc = "WFI", - .exit_latency = 1, - .target_residency = 1 * 2, - .flags = CPUIDLE_FLAG_TIME_VALID, - }, + .en_core_tk_irqen = 1, + .states[0] = CPUIDLE_ARM_WFI_STATE, .safe_state_index = 0, /* C1 */ .state_count = 1, };