From patchwork Wed Apr 4 20:12:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 7643 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 CF4D623E47 for ; Wed, 4 Apr 2012 20:13:16 +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 984A1A1878A for ; Wed, 4 Apr 2012 20:13:16 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so1063293iag.11 for ; Wed, 04 Apr 2012 13:13:16 -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=kP238ergSqTOGD7pdF1BTADOcR9qqSbXqLb/EjFiCH4=; b=R3TfcwurE5V4/LL7+vVHtgq4IOEaCUuN9Q2YoEhkGuzMpibpVpIX3oXmL9lJJX0O4T vl72uuBqxhS8FDkHMolEJ6T+laLmWx/MISh7qkv5R3tyzgKaGzEeQF6uyiW2lKKFPqKz jxf9FJ3vJ6B4qOLDF+ONyhlduvdQGrNNk97paVUWRvC+FG+OtDT7DEJcuyHQP8d60gPc Ix/arOH4wKia+qtVhP6PhN8NWCjyscXhTapuErj4nn4EUM92U6YYh6c1hwLUW1aOC0rq 1Xt1jyzP7tn5NfsjrYKjIcTPEerOzfzYnA4Dp1V8rM4vnQvM6cdfPACu3/W/ok5OOCVO eqrA== Received: by 10.50.173.35 with SMTP id bh3mr2835050igc.38.1333570396416; Wed, 04 Apr 2012 13:13:16 -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.164.217 with SMTP id f25csp56480iby; Wed, 4 Apr 2012 13:13:15 -0700 (PDT) Received: by 10.213.22.137 with SMTP id n9mr42202ebb.156.1333570395094; Wed, 04 Apr 2012 13:13:15 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id n52si1979021wed.91.2012.04.04.13.13.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 13:13:15 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds12so644793wgb.31 for ; Wed, 04 Apr 2012 13:13:14 -0700 (PDT) Received: by 10.216.137.163 with SMTP id y35mr2189002wei.33.1333570394563; Wed, 04 Apr 2012 13:13:14 -0700 (PDT) Received: from localhost.localdomain (AToulouse-159-1-7-136.w90-60.abo.wanadoo.fr. [90.60.242.136]) by mx.google.com with ESMTPS id gd4sm6869495wib.6.2012.04.04.13.13.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 13:13:13 -0700 (PDT) From: Daniel Lezcano To: santosh.shilimkar@ti.com, jean.pihet@newoldbits.com, khilman@ti.com, tony@atomide.com Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rob.lee@linaro.org, linaro-dev@lists.linaro.org, patches@linaro.org Subject: [PATCH 11/17][V2] ARM: OMAP3: cpuidle - remove cpuidle_params_table Date: Wed, 4 Apr 2012 22:12:45 +0200 Message-Id: <1333570371-1389-12-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1333570371-1389-1-git-send-email-daniel.lezcano@linaro.org> References: <1333570371-1389-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmP1gKRyVS2lqKHyc/VM+C6EKISe0wID7JLMouSNfPUXj53xDscbByzvC+AxP9zcygUuFEy We do not longer need the ''cpuidle_params_table' array as we defined the states in the driver and we checked they are all valid. We also remove the structure definition as it is no longer used. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet --- arch/arm/mach-omap2/cpuidle34xx.c | 28 +++------------------------- arch/arm/mach-omap2/pm.h | 12 ------------ 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 3f46e45..cdf1b8f 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -38,36 +38,14 @@ #ifdef CONFIG_CPU_IDLE -/* - * The latencies/thresholds for various C states have - * to be configured from the respective board files. - * These are some default values (which might not provide - * the best power savings) used on boards which do not - * pass these details from the board file. - */ -static struct cpuidle_params cpuidle_params_table[] = { - /* C1 */ - {2 + 2, 5, 1}, - /* C2 */ - {10 + 10, 30, 1}, - /* C3 */ - {50 + 50, 300, 1}, - /* C4 */ - {1500 + 1800, 4000, 1}, - /* C5 */ - {2500 + 7500, 12000, 1}, - /* C6 */ - {3000 + 8500, 15000, 1}, - /* C7 */ - {10000 + 30000, 300000, 1}, -}; -#define OMAP3_NUM_STATES ARRAY_SIZE(cpuidle_params_table) - /* Mach specific information to be recorded in the C-state driver_data */ struct omap3_idle_statedata { u32 mpu_state; u32 core_state; }; + +#define OMAP3_NUM_STATES 7 + struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES]; struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 5646b80..7856489 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -38,18 +38,6 @@ static inline int omap4_opp_init(void) } #endif -/* - * cpuidle mach specific parameters - * - * The board code can override the default C-states definition using - * omap3_pm_init_cpuidle - */ -struct cpuidle_params { - u32 exit_latency; /* exit_latency = sleep + wake-up latencies */ - u32 target_residency; - u8 valid; /* validates the C-state */ -}; - extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);