From patchwork Mon Feb 4 12:01:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2091021 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork1.kernel.org (Postfix) with ESMTP id A3CF03FD56 for ; Mon, 4 Feb 2013 12:06:07 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r14C27Kf019364; Mon, 4 Feb 2013 06:02:07 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r14C27Pr024906; Mon, 4 Feb 2013 06:02:07 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Mon, 4 Feb 2013 06:02:07 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r14C27XQ026507; Mon, 4 Feb 2013 06:02:07 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 52FB68062C; Mon, 4 Feb 2013 06:02:07 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 97B218062B for ; Mon, 4 Feb 2013 06:01:56 -0600 (CST) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r14C1u3o001163 for ; Mon, 4 Feb 2013 06:01:56 -0600 (CST) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by neches.ext.ti.com (8.13.7/8.13.7) with ESMTP id r14C1tPE027232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Feb 2013 06:01:56 -0600 Received: from [216.82.253.147:38630] by server-11.bemta-7.messagelabs.com id D6/2F-29415-333AF015; Mon, 04 Feb 2013 12:01:55 +0000 X-Env-Sender: daniel.lezcano@linaro.org X-Msg-Ref: server-3.tower-165.messagelabs.com!1359979313!12820410!1 X-Originating-IP: [209.85.212.174] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.7; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26328 invoked from network); 4 Feb 2013 12:01:55 -0000 Received: from mail-wi0-f174.google.com (HELO mail-wi0-f174.google.com) (209.85.212.174) by server-3.tower-165.messagelabs.com with RC4-SHA encrypted SMTP; 4 Feb 2013 12:01:55 -0000 Received: by mail-wi0-f174.google.com with SMTP id hi8so2287970wib.1 for ; Mon, 04 Feb 2013 04:01:53 -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=DzAHYz3BINJaxBFVmOOy/O76zSB7U2aHNceWZfO5LHs=; b=kaRKj7/CcKUYrALH2+154+Zkk7mabu+V+RCkYVPaT8wpjkFG5qROnzBoViKrsLEXTp h7vnozL+7UtRcIO/kmFDatNqfoH82/2B4ZqYEF3aGALKhssed4CVTFiwhC8+MTGHGT2I R6uD8mYGWeI5aIohLbsNLoJykFTnbqpIuLihbNmA7WNBzT6C12uue0iZMzKkVtfNBeF5 ChqB5jDt1XdOyJvVIRXvlSxXMDXGzXp8JA2BhO0w8oiDcOgYWQYetS7bYOQA79cu2khF cSP2/g1D4xFGXjeNAH8Yuu2Vh2GMCCqNCukoSnifhk1oXDX4J1QVPCb8o5jc+OGPB0Hn t8CQ== X-Received: by 10.194.76.165 with SMTP id l5mr34515729wjw.14.1359979313441; Mon, 04 Feb 2013 04:01:53 -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 j9sm12967916wia.5.2013.02.04.04.01.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 04:01:51 -0800 (PST) From: Daniel Lezcano To: , Subject: [PATCH 2/4][V2] davinci: cpuidle - move code to prevent forward declaration Date: Mon, 4 Feb 2013 13:01:42 +0100 Message-ID: <1359979304-8715-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359979304-8715-1-git-send-email-daniel.lezcano@linaro.org> References: <1359979304-8715-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmHLNBiEprLJUJ575OqPvcisoxR0xBDuXL/kqRWy/LZgNOneCBxa7kWJl7RiqG0ZUyKTU3D 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@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 Acked-by: Sekhar Nori --- 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 5fbd470..697febe 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; @@ -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;