From patchwork Mon Apr 29 13:24:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2500241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id CC384DF25A for ; Mon, 29 Apr 2013 13:27:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWo5y-0003IV-1m; Mon, 29 Apr 2013 13:26:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWo5f-0001Lt-KB; Mon, 29 Apr 2013 13:25:59 +0000 Received: from mail-pd0-f174.google.com ([209.85.192.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UWo5H-0001J7-QD for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2013 13:25:36 +0000 Received: by mail-pd0-f174.google.com with SMTP id y13so3220249pdi.5 for ; Mon, 29 Apr 2013 06:25:33 -0700 (PDT) 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:in-reply-to:references:x-gm-message-state; bh=mEcyHRN6IGnUB0Fbzbs3lKAJuoZZPhksIWmIpONE7/U=; b=O7jVivkfITBioPNhZb7546p63GEqeRMvNIFqHqhfVMC69im1ZL2G3Rl61uW+yueiZf xXI+rGWBAKWneWXNKO/11d6/SjXc7skIkDO29FEas26Sgc2JOLQOSKsLTgI3U7XHBr3g SLYrxp+wUIRv42FHmi0VNQYdaydwa3kMClqFcYZqFppEkGNvHE7VQzUX5B+e3RiqMEW6 TAYp/u0QZPE7rPuWWgcAuWunUp2ZeePENYKXeb2rmTGVNsiw8qLV7hzGt1dhO/T6SBrw Gv1cj46+WGlZv6PZJ81ZJwYHcvEaLxXXFiIf5kdcWAWkStvHpDZY6tH5rHlIbSjzUpM3 Ejug== X-Received: by 10.66.233.167 with SMTP id tx7mr42242316pac.110.1367241933794; Mon, 29 Apr 2013 06:25:33 -0700 (PDT) Received: from localhost ([122.172.192.131]) by mx.google.com with ESMTPSA id wl5sm25913294pac.18.2013.04.29.06.25.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Apr 2013 06:25:33 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 3/5] cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found Date: Mon, 29 Apr 2013 18:54:46 +0530 Message-Id: <7103baee30f84c26eb6080e407a9f91d219a54c0.1367241503.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnqH5W/6EFjYE/gFQCled315vY/1CewYSMPrjWtl90JkJzKyEsNyNP17fXPg3TiQH9UIhO3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130429_092535_965079_2EBF80F6 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.174 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: robin.randhawa@arm.com, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, Liviu.Dudau@arm.com, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linaro-kernel@lists.linaro.org, Steve.Bannister@arm.com, arvind.chauhan@arm.com, linux-arm-kernel@lists.infradead.org, charles.garcia-tobin@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If "/cpus" node isn't found or "clock-latency" isn't defined we are returning error currently. Lets return CPUFREQ_ETERNAL instead, so that we don't fail. Flag appropriate messages to user in such cases. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little_dt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/arm_big_little_dt.c b/drivers/cpufreq/arm_big_little_dt.c index d5ae4d2..173ed05 100644 --- a/drivers/cpufreq/arm_big_little_dt.c +++ b/drivers/cpufreq/arm_big_little_dt.c @@ -66,8 +66,8 @@ static int dt_get_transition_latency(struct device *cpu_dev) parent = of_find_node_by_path("/cpus"); if (!parent) { - pr_err("failed to find OF /cpus\n"); - return -ENOENT; + pr_info("Failed to find OF /cpus. Use CPUFREQ_ETERNAL transition latency\n"); + return CPUFREQ_ETERNAL; } for_each_child_of_node(parent, np) { @@ -81,7 +81,8 @@ static int dt_get_transition_latency(struct device *cpu_dev) return transition_latency; } - return -ENODEV; + pr_info("clock-latency isn't found, use CPUFREQ_ETERNAL transition latency\n"); + return CPUFREQ_ETERNAL; } static struct cpufreq_arm_bL_ops dt_bL_ops = {