From patchwork Wed Apr 4 09:42:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 7604 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 88A3323E4C for ; Wed, 4 Apr 2012 09:42:35 +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 5211EA186B6 for ; Wed, 4 Apr 2012 09:42:35 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so109604iag.11 for ; Wed, 04 Apr 2012 02:42:35 -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=ZAPjX193CEmkU9AoScE6cQonxSiuDsJODsKdcpZY7oo=; b=DBvpBYuu9jLwzLQL44sz6PDUN2uE3gCcgzetMAbC9ryttiLD9u147hGiCB8S1THtxX VaCmOOqvH/f9rZ6QMxUjRESI/QUlY/2lVV17CC63MMBUKp2+57z5u9yVdTIA4hpXmggN f3UywfDyS4KUhbYcorh3+gegGyCoDSJD+JLBzMxnc5PBb+4TCorSQmcvgptwYFF8s/ew Bag3foGJsBnYtxyH922QlLJoIKfxpXmaaPCJ9AoyyEPoEtV/nhDHcrjpdz1k2fOyqphf Ac50muyi8l9eH9YbfOome8W2OYUZLneEWGhTNrZz4hu4+bm6iSmpzK1sDA854MwsvG6n c6eA== Received: by 10.50.51.197 with SMTP id m5mr924266igo.38.1333532555124; Wed, 04 Apr 2012 02:42:35 -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 f25csp31239iby; Wed, 4 Apr 2012 02:42:34 -0700 (PDT) Received: by 10.216.145.209 with SMTP id p59mr1012826wej.50.1333532553575; Wed, 04 Apr 2012 02:42:33 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id g9si86178wee.142.2012.04.04.02.42.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 02:42:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.178 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-wi0-f178.google.com with SMTP id hq7so61598wib.13 for ; Wed, 04 Apr 2012 02:42:33 -0700 (PDT) Received: by 10.180.88.169 with SMTP id bh9mr3710898wib.5.1333532553047; Wed, 04 Apr 2012 02:42:33 -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 bx13sm3462265wib.10.2012.04.04.02.42.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 02:42:32 -0700 (PDT) From: Daniel Lezcano To: tony@atomide.com, khilman@ti.com Cc: j-pihet@ti.com, santosh.shilimkar@ti.com, rob.lee@linaro.org, linaro-dev@lists.linaro.org, patches@linaro.org Subject: [PATCH 07/17] ARM: OMAP4: cpuidle - remove omap4_idle_data initialization at boot time Date: Wed, 4 Apr 2012 11:42:09 +0200 Message-Id: <1333532539-10298-8-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1333532539-10298-1-git-send-email-daniel.lezcano@linaro.org> References: <1333532539-10298-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnMYOB1JrcNiNqD12fWAXw5lCaiBJrwNWZLxKqCiCMHjTeteAY7TH143wiGMU64JOXaZz/9 We initialized it at compile time, no need to do that at boot time. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet Reviewed-by: Santosh Shilimkar --- arch/arm/mach-omap2/cpuidle44xx.c | 26 +------------------------- 1 files changed, 1 insertions(+), 25 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index b82f9fe..b0dd220 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -33,7 +33,7 @@ struct omap4_idle_statedata { #define OMAP4_NUM_STATES 3 -static struct omap4_idle_statedata omap4_idle_data[] = { +static struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES] = { { .cpu_state = PWRDM_POWER_ON, .mpu_state = PWRDM_POWER_ON, @@ -172,14 +172,6 @@ struct cpuidle_driver omap4_idle_driver = { .safe_state_index = 0, }; -static inline struct omap4_idle_statedata *_fill_cstate_usage( - struct cpuidle_device *dev, - int idx) -{ - struct omap4_idle_statedata *cx = &omap4_idle_data[idx]; - return cx; -} - /** * omap4_idle_init - Init routine for OMAP4 idle * @@ -188,7 +180,6 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage( */ int __init omap4_idle_init(void) { - struct omap4_idle_statedata *cx; struct cpuidle_driver *drv = &omap4_idle_driver; struct cpuidle_device *dev; unsigned int cpu_id = 0; @@ -202,21 +193,6 @@ int __init omap4_idle_init(void) dev = &per_cpu(omap4_idle_dev, cpu_id); dev->cpu = cpu_id; - cx = _fill_cstate_usage(dev, 0); - cx->cpu_state = PWRDM_POWER_ON; - cx->mpu_state = PWRDM_POWER_ON; - cx->mpu_logic_state = PWRDM_POWER_RET; - - cx = _fill_cstate_usage(dev, 1); - cx->cpu_state = PWRDM_POWER_OFF; - cx->mpu_state = PWRDM_POWER_RET; - cx->mpu_logic_state = PWRDM_POWER_RET; - - cx = _fill_cstate_usage(dev, 2); - cx->cpu_state = PWRDM_POWER_OFF; - cx->mpu_state = PWRDM_POWER_RET; - cx->mpu_logic_state = PWRDM_POWER_OFF; - cpuidle_register_driver(&omap4_idle_driver); dev->state_count = drv->state_count;