From patchwork Wed Apr 4 20:12:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 7639 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 5535723E47 for ; Wed, 4 Apr 2012 20:13:09 +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 1C72EA18210 for ; Wed, 4 Apr 2012 20:13:09 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so1063293iag.11 for ; Wed, 04 Apr 2012 13:13:08 -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=LIiOfb24/ZO7UXcFsLnxlbfMa/Qle7ftc4TepSIAdYF0YvRrt4XCFTrawoL5m9xdlu QyBMOLGncS6NMssZ+HFSYjcc388qYZfi5A5suTsm1tKCNQ8ldy7znX3Fsl0pJ7AO7Yys SZo0LJ+yjbLrb5xCGxYsuqx18j0KEC0+bhWPmvX98ixi1iEVj0yXYcGUSF7E81VvJHtN h1h6RCstVR2HRrPH1+OkBVTXh8VNxlX79LM/yR56iQ93iFmTAbsgl1VT7V3RNSS7QC1E i05IKpVZ7wtwxsXtdcy2wg4DQvfnfEyjlSTqkmwvvYzpbYvtq8e6AlCNrunzCjJ3xI/4 jIrQ== Received: by 10.50.51.197 with SMTP id m5mr2837532igo.38.1333570388879; Wed, 04 Apr 2012 13:13:08 -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 f25csp56468iby; Wed, 4 Apr 2012 13:13:08 -0700 (PDT) Received: by 10.14.127.12 with SMTP id c12mr3577842eei.19.1333570387702; Wed, 04 Apr 2012 13:13:07 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id h5si2247543wih.41.2012.04.04.13.13.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 13:13:07 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.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-we0-f178.google.com with SMTP id a13so551012wer.37 for ; Wed, 04 Apr 2012 13:13:07 -0700 (PDT) Received: by 10.216.131.34 with SMTP id l34mr2185538wei.54.1333570386974; Wed, 04 Apr 2012 13:13:06 -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.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 13:13:06 -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 07/17][V2] ARM: OMAP4: cpuidle - remove omap4_idle_data initialization at boot time Date: Wed, 4 Apr 2012 22:12:41 +0200 Message-Id: <1333570371-1389-8-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: ALoCoQld1MYHpzikcBi80cogwT2mR903YfQBqXpvf1SfVdHbHbfA6AlfnwqLmyTaC/k7qnN3eDOw 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;