From patchwork Tue May 27 11:50:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30964 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3E5E4203C3 for ; Tue, 27 May 2014 11:53:21 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id l6sf48184246oag.11 for ; Tue, 27 May 2014 04:53:20 -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=7l+i2rKM9sxh6QpNUaR3QXzRwdl917iXLQvcPlKnsl4=; b=knFXCOKTW6dxTgnNwceFJRd8kI/rxF2fkeMSQTqhk2sPm8dNtI4hK3m5MzB24E3GXb czU2Md222iUtUoI+aZlh7+rKcMdUjIJcSzJyURnUvsDy1ouiBmXcmCV2DnbM58lFzb05 lXYq9uTQQzGH1lfCjw98uJbLjazI3Qj51PoI8K0aoQebXUY8DXtuybszIP3OxXx9sahM kNZl8o9n2GgE+RAEXQxcqQZBMwtkQr89yL+hsYEx+L+rM70ecYDlXJ73U1ZmOBHdG6By 5S7Spux95bljH4u87igrGWCVgFFIbKQpNlWKC+AKXjhGgdCefAh7MddwevGwuLFCn/Ok jT/Q== X-Gm-Message-State: ALoCoQmHfIwz4lqtArZz26ILf1TiHfUl8GQK9U7zXiwKxeZ6/28+6Du/OLF7pS/LRdCkKy3N7HNb X-Received: by 10.43.117.71 with SMTP id fl7mr11837998icc.24.1401191600843; Tue, 27 May 2014 04:53:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.67 with SMTP id g61ls3116989qgg.12.gmail; Tue, 27 May 2014 04:53:20 -0700 (PDT) X-Received: by 10.52.94.47 with SMTP id cz15mr22310706vdb.0.1401191600691; Tue, 27 May 2014 04:53:20 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id n9si7932357vcl.94.2014.05.27.04.53.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 May 2014 04:53:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id sa20so10553871veb.37 for ; Tue, 27 May 2014 04:53:20 -0700 (PDT) X-Received: by 10.220.249.198 with SMTP id ml6mr1094892vcb.36.1401191600610; Tue, 27 May 2014 04:53:20 -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 ib8csp112598vcb; Tue, 27 May 2014 04:53:20 -0700 (PDT) X-Received: by 10.66.102.39 with SMTP id fl7mr35366100pab.43.1401191599626; Tue, 27 May 2014 04:53:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fi4si18351451pbb.193.2014.05.27.04.53.19 for ; Tue, 27 May 2014 04:53:19 -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 S1752423AbaE0LxL (ORCPT + 27 others); Tue, 27 May 2014 07:53:11 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:62297 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390AbaE0LxG (ORCPT ); Tue, 27 May 2014 07:53:06 -0400 Received: by mail-pa0-f46.google.com with SMTP id kq14so8957177pab.5 for ; Tue, 27 May 2014 04:53:06 -0700 (PDT) X-Received: by 10.68.160.163 with SMTP id xl3mr36624777pbb.39.1401191586110; Tue, 27 May 2014 04:53:06 -0700 (PDT) Received: from localhost ([223.227.245.64]) by mx.google.com with ESMTPSA id g6sm72555558pat.2.2014.05.27.04.53.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 May 2014 04:53:05 -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, nm@ti.com, chander.kashyap@linaro.org, pavel@ucw.cz, len.brown@intel.com, sudeep.holla@arm.com, Viresh Kumar Subject: [PATCH V4 5/8] cpufreq: arm_big_little: don't initialize opp table Date: Tue, 27 May 2014 17:20:54 +0530 Message-Id: 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.128.178 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: , CPU OPP tables are already initialized by CPU core and we don't need to reinitialize them from arm_big_little_dt driver. As the arm_big_little_dt driver doesn't have a .init_opp_table() callback anymore, make this callback optional. 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)