From patchwork Thu May 22 05:37:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30561 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9C9C420675 for ; Thu, 22 May 2014 05:38:35 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf13171639obc.7 for ; Wed, 21 May 2014 22:38:35 -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=KwVzll33Ui4+qkVaon+Uw5fH1e/HTtSsehOKK6TY59zGQgG0MlgyIlmpoiOAveLGLM c4iY9qKNADmQDHDNIEmrXt8zrs1B65RoPGFP6yEcDMCEcy+NnOUv85hd7X1g5YSCGS5g L4gFp4kncEKaIcElDTViZi1J4iFTk0XnVWD0D6l+pZJlD+cWhWwpHHWSUMOgQImSRpHZ 9+gvsxP3TA4GUjBwl7meQNL2cPQDtvFb05Heb9zFM4+ItZiQR/4AsBE+XtjPw6jt3xmT MexdiF9dGKZCiYeBqaCEQnZDhjzM8m3PmtKOP85yKjURV6Xi6IgSuL8XezUPV2QHKF6Y mR9A== X-Gm-Message-State: ALoCoQlU0kJ1qH7FrBkdBo6tKTfbzMEhzA3cUKZjbzyf6nacHGWDmlwAs6w39/wWzD4EyoteaPG/ X-Received: by 10.182.210.137 with SMTP id mu9mr8566606obc.48.1400737115188; Wed, 21 May 2014 22:38:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.5 with SMTP id s5ls1111924qgd.75.gmail; Wed, 21 May 2014 22:38:35 -0700 (PDT) X-Received: by 10.53.12.229 with SMTP id et5mr11742872vdd.32.1400737115049; Wed, 21 May 2014 22:38:35 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id mg9si4281384vcb.58.2014.05.21.22.38.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 22:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jw12so3789482veb.34 for ; Wed, 21 May 2014 22:38:35 -0700 (PDT) X-Received: by 10.221.42.135 with SMTP id ty7mr13993315vcb.14.1400737114974; Wed, 21 May 2014 22:38:34 -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 ib8csp169761vcb; Wed, 21 May 2014 22:38:34 -0700 (PDT) X-Received: by 10.68.191.39 with SMTP id gv7mr63851844pbc.90.1400737113809; Wed, 21 May 2014 22:38:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw10si8524279pbd.55.2014.05.21.22.38.33; Wed, 21 May 2014 22:38:33 -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 S1753789AbaEVFi0 (ORCPT + 27 others); Thu, 22 May 2014 01:38:26 -0400 Received: from mail-qc0-f179.google.com ([209.85.216.179]:37237 "EHLO mail-qc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbaEVFiW (ORCPT ); Thu, 22 May 2014 01:38:22 -0400 Received: by mail-qc0-f179.google.com with SMTP id x3so4886358qcv.24 for ; Wed, 21 May 2014 22:38:22 -0700 (PDT) X-Received: by 10.140.48.1 with SMTP id n1mr10264663qga.107.1400737102199; Wed, 21 May 2014 22:38:22 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id d89sm2110936qga.2.2014.05.21.22.38.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 May 2014 22:38:21 -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 V3 5/8] cpufreq: arm_big_little: don't initialize opp table Date: Thu, 22 May 2014 11:07:29 +0530 Message-Id: <4ee83883f4ce7f39010b0855ee1c63934970cacd.1400736536.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.128.175 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)