From patchwork Tue Apr 24 14:05:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 8077 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 07B0C23E1D for ; Tue, 24 Apr 2012 14:06:00 +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 C2C80A18962 for ; Tue, 24 Apr 2012 14:05:59 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so1457668iag.11 for ; Tue, 24 Apr 2012 07:05:59 -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=TvhnA+DvJzvNI7ODI/thgM/SuTs4zUx4JlBrfdtkwDc=; b=aB3v7Q7IfxgNWLLvu1zp12FiHip2YYHHQYb2adkhxmpN0EeqHrMyfBp5u19NRAlO9J 4aWNM1vIHrGrHp6N+RGETqI7tyXU+eci1t/QwUhWKyELMJfZb2QJlqLDun8srIuBK9dI 0FiqzGW/Xb2ZZQwfc7nw2RA811uZ/GAwfmqjGMM/FIBQCps4m0BEzXcMwlGxQr5f/olt bNRTQKFu02ibHXJGyiB2VH7+Ba7FAfcxG6CbmYaAuzBaZ2Una6EHlsy+d9euJFMI6oMF kQi0RQqr8zVOMufWGjNKjSClWAOIxwucdBx8bMsBB8TZEUmNm2z/++CJFwbOsqM4tApg pgFQ== Received: by 10.50.41.201 with SMTP id h9mr10441924igl.19.1335276359562; Tue, 24 Apr 2012 07:05:59 -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.137.198 with SMTP id x6csp183977ibt; Tue, 24 Apr 2012 07:05:58 -0700 (PDT) Received: by 10.180.81.37 with SMTP id w5mr19397528wix.16.1335276358301; Tue, 24 Apr 2012 07:05:58 -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 bt8si13302092wib.40.2012.04.24.07.05.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:05:58 -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 ds12so684920wgb.31 for ; Tue, 24 Apr 2012 07:05:57 -0700 (PDT) Received: by 10.180.102.3 with SMTP id fk3mr8218710wib.9.1335276357855; Tue, 24 Apr 2012 07:05:57 -0700 (PDT) Received: from localhost.localdomain (AToulouse-159-1-17-225.w92-134.abo.wanadoo.fr. [92.134.64.225]) by mx.google.com with ESMTPS id fl2sm47121222wib.2.2012.04.24.07.05.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 07:05:57 -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, linaro-dev@lists.linaro.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org Subject: [PATCH 08/18][V3] ARM: OMAP3: cpuidle - remove rx51 cpuidle parameters table Date: Tue, 24 Apr 2012 16:05:29 +0200 Message-Id: <1335276339-11135-9-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> References: <1335276339-11135-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnNl1/8DvZwympBPw+ONGpVbdbQ4W+Oy5Y2bV5mimb5G1MeA/2SzAnE5ysSLKq3BbMvXU/3 As suggested, this table is an optimized version for rx51 and we remove it in order to consolidate the cpuidle code between omap3 and omap4, we remove this specific data definition which is used to override the default omap3 latencies but at the cost of extra code and complexity. In order to not lose the values which probably took time to be measured, the table is converted into a comment with an array description. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet --- arch/arm/mach-omap2/board-rx51.c | 38 +++++++++++++++++------------------- arch/arm/mach-omap2/cpuidle34xx.c | 17 ---------------- arch/arm/mach-omap2/pm.h | 9 -------- 3 files changed, 18 insertions(+), 46 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 27f01f0..2da92a6 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -59,25 +59,24 @@ static struct platform_device leds_gpio = { }; /* - * cpuidle C-states definition override from the default values. - * The 'exit_latency' field is the sum of sleep and wake-up latencies. - */ -static struct cpuidle_params rx51_cpuidle_params[] = { - /* C1 */ - {110 + 162, 5 , 1}, - /* C2 */ - {106 + 180, 309, 1}, - /* C3 */ - {107 + 410, 46057, 0}, - /* C4 */ - {121 + 3374, 46057, 0}, - /* C5 */ - {855 + 1146, 46057, 1}, - /* C6 */ - {7580 + 4134, 484329, 0}, - /* C7 */ - {7505 + 15274, 484329, 1}, -}; + * cpuidle C-states definition for rx51. + * + * The 'exit_latency' field is the sum of sleep + * and wake-up latencies. + + --------------------------------------------- + | state | exit_latency | target_residency | + --------------------------------------------- + | C1 | 110 + 162 | 5 | + | C2 | 106 + 180 | 309 | + | C3 | 107 + 410 | 46057 | + | C4 | 121 + 3374 | 46057 | + | C5 | 855 + 1146 | 46057 | + | C6 | 7580 + 4134 | 484329 | + | C7 | 7505 + 15274 | 484329 | + --------------------------------------------- + +*/ extern void __init rx51_peripherals_init(void); @@ -98,7 +97,6 @@ static void __init rx51_init(void) struct omap_sdrc_params *sdrc_params; omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); - omap3_pm_init_cpuidle(rx51_cpuidle_params); omap_serial_init(); sdrc_params = nokia_get_sdram_timings(); diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 5358664..3519a8b 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -298,23 +298,6 @@ select_state: DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); -void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) -{ - int i; - - if (!cpuidle_board_params) - return; - - for (i = 0; i < OMAP3_NUM_STATES; i++) { - cpuidle_params_table[i].valid = cpuidle_board_params[i].valid; - cpuidle_params_table[i].exit_latency = - cpuidle_board_params[i].exit_latency; - cpuidle_params_table[i].target_residency = - cpuidle_board_params[i].target_residency; - } - return; -} - struct cpuidle_driver omap3_idle_driver = { .name = "omap3_idle", .owner = THIS_MODULE, diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 36fa90b..5646b80 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -50,15 +50,6 @@ struct cpuidle_params { u8 valid; /* validates the C-state */ }; -#if defined(CONFIG_PM) && defined(CONFIG_CPU_IDLE) -extern void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params); -#else -static -inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) -{ -} -#endif - extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);