From patchwork Fri Feb 1 13:48:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2080821 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id CA62140106 for ; Fri, 1 Feb 2013 13:48:49 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r11DmnZg011623 for ; Fri, 1 Feb 2013 07:48:49 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r11Dmnkr024667 for ; Fri, 1 Feb 2013 07:48:49 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 1 Feb 2013 07:48:49 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r11DmnM5022506 for ; Fri, 1 Feb 2013 07:48:49 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DAA3A8062A for ; Fri, 1 Feb 2013 07:48:48 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id D4A3B80627 for ; Fri, 1 Feb 2013 07:48:32 -0600 (CST) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id r11DmWj0027096 for ; Fri, 1 Feb 2013 07:48:32 -0600 (CST) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id r11DmWeE028462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Feb 2013 07:48:32 -0600 Received: from [216.82.250.99:60856] by server-15.bemta-12.messagelabs.com id C4/BF-16751-0B7CB015; Fri, 01 Feb 2013 13:48:32 +0000 X-Env-Sender: daniel.lezcano@linaro.org X-Msg-Ref: server-13.tower-126.messagelabs.com!1359726509!10970229!1 X-Originating-IP: [209.85.212.179] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.7; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17024 invoked from network); 1 Feb 2013 13:48:30 -0000 Received: from mail-wi0-f179.google.com (HELO mail-wi0-f179.google.com) (209.85.212.179) by server-13.tower-126.messagelabs.com with RC4-SHA encrypted SMTP; 1 Feb 2013 13:48:30 -0000 Received: by mail-wi0-f179.google.com with SMTP id ez12so597823wid.6 for ; Fri, 01 Feb 2013 05:48:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=EZUX5akdexPx00pAuI6qJqHpVIf7c8K/kRvCJ77RllQ=; b=aamSeSn9b0mUGLW2kGFXz52YvRawNylcNu7ku1j1AHN+ertthUUJJvdgSTFRtkOkH1 Is1Ak2uAJKRNPeE0g9e6eCH2igxDtsU4G2ygncmHwGlOsPhsjWQNshbNwMqckn1XoHOA 601kbCWRIgjjoDernj4wlEZkJBrMV4wVpHgcdFTqtwvv7NiYAfMhZq6/0TfTphQgkvXp 2r34dkwitcPQP/RyAzngBgxqJSYZmfrpT/qDIL82M2uqnOJ3RATkSIVGy6LbxGtwJMK2 CrKK+lOJQMyyOO9apdKTgyUtfNOga1yuabpZDNKGmG0ZbHahen5ljpHNodATKdwTfM4G AwuQ== X-Received: by 10.180.73.116 with SMTP id k20mr2959753wiv.21.1359726499963; Fri, 01 Feb 2013 05:48:19 -0800 (PST) Received: from mai.home (AToulouse-654-1-332-150.w86-199.abo.wanadoo.fr. [86.199.219.150]) by mx.google.com with ESMTPS id bd7sm3692703wib.8.2013.02.01.05.48.18 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Feb 2013 05:48:19 -0800 (PST) From: Daniel Lezcano To: , Subject: [PATCH 2/4] davinci: cpuidle - move code to prevent forward declaration Date: Fri, 1 Feb 2013 14:48:13 +0100 Message-ID: <1359726495-8024-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359726495-8024-1-git-send-email-daniel.lezcano@linaro.org> References: <1359726495-8024-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQnKh7nNyw7gRjXYJePissxY9UtKWPAOVDKPBMJ1r9Xp8a/K+r45VwT8n/wi9E7TTtGu1v+B CC: , , , , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com The patch is mindless, it just moves the idle function below in the file in order to prevent forward declaration in the next patch. Signed-off-by: Daniel Lezcano --- arch/arm/mach-davinci/cpuidle.c | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index ebb8808..9438672 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c @@ -31,42 +31,6 @@ struct davinci_ops { u32 flags; }; -/* Actual code that puts the SoC in different idle states */ -static int davinci_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) -{ - struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; - struct davinci_ops *ops = cpuidle_get_statedata(state_usage); - - if (ops && ops->enter) - ops->enter(); - - index = cpuidle_wrap_enter(dev, drv, index, - arm_cpuidle_simple_enter); - - if (ops && ops->exit) - ops->exit(); - - return index; -} - -static struct cpuidle_driver davinci_idle_driver = { - .name = "cpuidle-davinci", - .owner = THIS_MODULE, - .en_core_tk_irqen = 1, - .states[0] = ARM_CPUIDLE_WFI_STATE, - .states[1] = { - .enter = davinci_enter_idle, - .exit_latency = 10, - .target_residency = 100000, - .flags = CPUIDLE_FLAG_TIME_VALID, - .name = "DDR SR", - .desc = "WFI and DDR Self Refresh", - }, - .state_count = DAVINCI_CPUIDLE_MAX_STATES, -}; - static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device); static void __iomem *ddr2_reg_base; static bool ddr2_pdown = false; @@ -107,6 +71,42 @@ static struct davinci_ops davinci_states[DAVINCI_CPUIDLE_MAX_STATES] = { }, }; +/* Actual code that puts the SoC in different idle states */ +static int davinci_enter_idle(struct cpuidle_device *dev, + struct cpuidle_driver *drv, + int index) +{ + struct cpuidle_state_usage *state_usage = &dev->states_usage[index]; + struct davinci_ops *ops = cpuidle_get_statedata(state_usage); + + if (ops && ops->enter) + ops->enter(); + + index = cpuidle_wrap_enter(dev, drv, index, + arm_cpuidle_simple_enter); + + if (ops && ops->exit) + ops->exit(); + + return index; +} + +static struct cpuidle_driver davinci_idle_driver = { + .name = "cpuidle-davinci", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, + .states[0] = ARM_CPUIDLE_WFI_STATE, + .states[1] = { + .enter = davinci_enter_idle, + .exit_latency = 10, + .target_residency = 100000, + .flags = CPUIDLE_FLAG_TIME_VALID, + .name = "DDR SR", + .desc = "WFI and DDR Self Refresh", + }, + .state_count = DAVINCI_CPUIDLE_MAX_STATES, +}; + static int __init davinci_cpuidle_probe(struct platform_device *pdev) { int ret;