From patchwork Mon May 19 06:17:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30360 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A4B71203AB for ; Mon, 19 May 2014 06:18:34 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id jt11sf29483454pbb.6 for ; Sun, 18 May 2014 23:18:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=EMbeAyXJkD+jm4H34uMevGzXA3BxVq0Mdz55ai3rBaA=; b=auiGUjvT51EiRlStf8zct7/fsRRV8gUDfUjUwKvpmv7c0iQr1DI+xNzluVwXQt8e8c EEl8WgvH3aqKDaY25g2E9tMpD+dGibGOJPX3xINFJH1QBFB+/2QzjEjV2ezMOfkkm3a8 zMvkpb1OpUySmhOybTV2qzsQWV1tn0GnCtPueBbYl2Py5xMG+LPkFzLcZjT0ytmUc6dj w0IYtbf/WTjec0uURmT+/N/CTHbUStPYi/WLRLSbq/GRbWjocIIk1QZ2szlmwLNI1QOj FZnrdUcfCQ6a7GQMWULj3cTzgLYk1xbJnF6mwvUiUnLgQSw4OoE36yu7IatpVDZEHdOD Y+2w== X-Gm-Message-State: ALoCoQnoFVKmBNrN6xFfF5a+o/xBvOAM0WdJe/ZoTjXqQYwWqgX9IqyDw3nkwzVJr2VawV3Z4tOo X-Received: by 10.66.157.138 with SMTP id wm10mr1549727pab.23.1400480313419; Sun, 18 May 2014 23:18:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.97 with SMTP id g88ls1524200qgf.40.gmail; Sun, 18 May 2014 23:18:33 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr11210704vdb.20.1400480313319; Sun, 18 May 2014 23:18:33 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id dh4si3671522veb.49.2014.05.18.23.18.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 May 2014 23:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id la4so9015432vcb.41 for ; Sun, 18 May 2014 23:18:33 -0700 (PDT) X-Received: by 10.58.228.163 with SMTP id sj3mr16957345vec.28.1400480313213; Sun, 18 May 2014 23:18:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp223358vcb; Sun, 18 May 2014 23:18:32 -0700 (PDT) X-Received: by 10.66.136.103 with SMTP id pz7mr40450595pab.140.1400480312365; Sun, 18 May 2014 23:18:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xx4si18165141pab.114.2014.05.18.23.18.31; Sun, 18 May 2014 23:18:31 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbaESGSQ (ORCPT + 27 others); Mon, 19 May 2014 02:18:16 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:63078 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752811AbaESGSM (ORCPT ); Mon, 19 May 2014 02:18:12 -0400 Received: by mail-wi0-f181.google.com with SMTP id n15so3548741wiw.8 for ; Sun, 18 May 2014 23:18:11 -0700 (PDT) X-Received: by 10.194.58.161 with SMTP id s1mr27474185wjq.43.1400480291519; Sun, 18 May 2014 23:18:11 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id dn4sm13251502wib.18.2014.05.18.23.18.06 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 18 May 2014 23:18:10 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, inderpal.s@samsung.com, pavel@ucw.cz, nm@ti.com, chander.kashyap@linaro.org, Viresh Kumar , Sudeep Holla Subject: [PATCH 2/5] cpufreq: arm_big_little: don't initialize opp table Date: Mon, 19 May 2014 11:47:22 +0530 Message-Id: <93612a01af60d392a685e37d4d47ed80997412dc.1400480033.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , OPP tables are already initialized for all CPUs by cpufreq core and so we don't need to reinitialize them from arm_big_little_dt driver. Also, as the arm_big_little_dt driver doesn't have a .init_opp_table() callback anymore, make it optional in arm_big_little driver. Cc: Sudeep Holla Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 12 +++++++----- drivers/cpufreq/arm_big_little_dt.c | 18 ------------------ 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 1f4d4e3..561261e 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -325,11 +325,13 @@ static int _get_cluster_clk_and_freq_table(struct device *cpu_dev) if (freq_table[cluster]) return 0; - ret = arm_bL_ops->init_opp_table(cpu_dev); - if (ret) { - dev_err(cpu_dev, "%s: init_opp_table failed, cpu: %d, err: %d\n", + if (arm_bL_ops->init_opp_table) { + ret = arm_bL_ops->init_opp_table(cpu_dev); + if (ret) { + dev_err(cpu_dev, "%s: init_opp_table failed, cpu: %d, err: %d\n", __func__, cpu_dev->id, ret); - goto out; + goto out; + } } ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table[cluster]); @@ -542,7 +544,7 @@ int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops) return -EBUSY; } - if (!ops || !strlen(ops->name) || !ops->init_opp_table) { + if (!ops || !strlen(ops->name)) { pr_err("%s: Invalid arm_bL_ops, exiting\n", __func__); return -ENODEV; } diff --git a/drivers/cpufreq/arm_big_little_dt.c b/drivers/cpufreq/arm_big_little_dt.c index 8d9d591..502182d 100644 --- a/drivers/cpufreq/arm_big_little_dt.c +++ b/drivers/cpufreq/arm_big_little_dt.c @@ -43,23 +43,6 @@ static struct device_node *get_cpu_node_with_valid_op(int cpu) return np; } -static int dt_init_opp_table(struct device *cpu_dev) -{ - struct device_node *np; - int ret; - - np = of_node_get(cpu_dev->of_node); - if (!np) { - pr_err("failed to find cpu%d node\n", cpu_dev->id); - return -ENOENT; - } - - ret = of_init_opp_table(cpu_dev); - of_node_put(np); - - return ret; -} - static int dt_get_transition_latency(struct device *cpu_dev) { struct device_node *np; @@ -81,7 +64,6 @@ static int dt_get_transition_latency(struct device *cpu_dev) static struct cpufreq_arm_bL_ops dt_bL_ops = { .name = "dt-bl", .get_transition_latency = dt_get_transition_latency, - .init_opp_table = dt_init_opp_table, }; static int generic_bL_probe(struct platform_device *pdev)