Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3019239imm; Mon, 16 Jul 2018 19:51:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdeAdOKADqXh19NjwBm1+7XLoTUfPPbpALq1dpkpZPQ8+CHuitpx7PP3pbSehcNYcD/IHmL X-Received: by 2002:a17:902:28e4:: with SMTP id f91-v6mr19268935plb.146.1531795875401; Mon, 16 Jul 2018 19:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531795875; cv=none; d=google.com; s=arc-20160816; b=c0dTxAg5ZgAQA7qXl54f1MfZ+LVtvVxd0oILpnEefRr+G0Wg1KKzhbG2cw5rH6NyiF m00B3EgNa8qrEDjYfLWVtuhcEOBxSO7T2piHyQtIr2Q9XE22UHoXr+IPK/4xjeUIjGtP mIkvKbB9E3VeI5jVLjHvzXfdijHSePrqVufi362mKkjUCXTVoMDJTFxvYkrMSaAkPPJ/ ln+uUwDQT+Ys98Q2CtNdaUTWBzbuwc8Fku18Q3kWuZY3BEnroqHbsDT1ROr4tM0NIBJX 9c3EMNMCJBrdcOI+b55K3gIEtaT29sXAm3zhK/84eLu9fJNe1bcwY6Aww7/zNnv+eZCu ahQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=faRB3ZPYJ/SAyIPoUG4SLvWw5HErRBmn6fwTLkADsAs=; b=KEBtILtarMD/WkAMUHA9/pi9G1yQ7l8U2C5ejoPpsA97eWIcRkMkfzvsHDCGaBARWO ZH0JlSHRRQZP+qG9xQoFT1/vecl2S610+NFArbJKg++Tle9p2UPSZ8+CLxcPQS+gth1U tYhb9Xe6QDg9GnbdfizjPU8+DfnemKAcRaPnxBPSgD5jBj2lEB4l3Rg/ppWRIaykTmUh XysP5OB363T6REJOsmZcbNgcLF2V2f7bK6RJ/NXL5NL6AW25hmdRvHu3J3L8n3gWmFQZ +o6oCvITPP9qYua3onb2bxmyfUUBIM4PtDKHTdXaS+UfynMwbQzTePc3BhyF3kTBJgJn c6nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nBPLt8xo; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZvGTT4Ly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16-v6si1583218plq.262.2018.07.16.19.50.57; Mon, 16 Jul 2018 19:51:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nBPLt8xo; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZvGTT4Ly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729997AbeGQDUk (ORCPT + 99 others); Mon, 16 Jul 2018 23:20:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37232 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729859AbeGQDUk (ORCPT ); Mon, 16 Jul 2018 23:20:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C40226014B; Tue, 17 Jul 2018 02:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1531795821; bh=T+1bzQu8I48/z0LdkY/ID+CeZCQjEPYUQhIuVGUSLFs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=nBPLt8xobixqrH7ESE2oIYqeZklnHUyYdweRth2m8z2hOwdQrcHVBKI1/H+8pgefY gTVuvph4PXTufij9aqFALvVFvFBTgwn0nP54MKBJ5WRo6QUVLkSZADzPXNQU01EZ3F zcRt1/udYtQlsePQFVqcuPdtunnV1GZ9xptjUoeg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.4.34.47] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tdas@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F1CD76014B; Tue, 17 Jul 2018 02:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1531795820; bh=T+1bzQu8I48/z0LdkY/ID+CeZCQjEPYUQhIuVGUSLFs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZvGTT4Ly8stBcETuCsA6GYyFpBhcKQnSNHwFKEsrXwNjEj5sfYPEQaxGTI3wmPvTe Cpop9ptrs/Goxd7aPqfBsHlDAtHNkmFCoDnUh0VvIFkAFWvZFuHAcbicLlVZlGB3TO bA3xDaXsM+A0RFSh20rlcaeFfH6J4LSiXnytDotY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F1CD76014B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tdas@codeaurora.org Subject: Re: [PATCH v5 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver To: Evan Green Cc: rjw@rjwysocki.net, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, sboyd@kernel.org, Rajendra Nayak , anischal@codeaurora.org, devicetree@vger.kernel.org, robh@kernel.org, Saravana Kannan , amit.kucheria@linaro.org References: <1531418745-19742-1-git-send-email-tdas@codeaurora.org> <1531418745-19742-3-git-send-email-tdas@codeaurora.org> From: Taniya Das Message-ID: <6a75b366-8290-e820-571c-675c060e573e@codeaurora.org> Date: Tue, 17 Jul 2018 08:20:14 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Evan, Thank you for testing the patch. On 7/17/2018 4:32 AM, Evan Green wrote: > Hi Taniya, > On Thu, Jul 12, 2018 at 11:06 AM Taniya Das wrote: >> >> The CPUfreq HW present in some QCOM chipsets offloads the steps necessary >> for changing the frequency of CPUs. The driver implements the cpufreq >> driver interface for this hardware engine. >> >> Signed-off-by: Saravana Kannan >> Signed-off-by: Taniya Das >> --- >> drivers/cpufreq/Kconfig.arm | 10 ++ >> drivers/cpufreq/Makefile | 1 + >> drivers/cpufreq/qcom-cpufreq-hw.c | 344 ++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 355 insertions(+) >> create mode 100644 drivers/cpufreq/qcom-cpufreq-hw.c >> > ... >> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c >> new file mode 100644 >> index 0000000..fa25a95 >> --- /dev/null >> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c > ... >> +static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) >> +{ >> + struct cpufreq_qcom *c; >> + >> + c = qcom_freq_domain_map[policy->cpu]; >> + if (!c) { >> + pr_err("No scaling support for CPU%d\n", policy->cpu); >> + return -ENODEV; >> + } >> + >> + cpumask_copy(policy->cpus, &c->related_cpus); >> + >> + policy->fast_switch_possible = true; >> + policy->freq_table = c->table; >> + policy->driver_data = c; >> + >> + return 0; > I haven't looked at this driver in detail, but I have tested it. > Instead of the line above, I needed: > > return cpufreq_table_validate_and_show(policy, c->table); > > Without this the framework thinks that the min and max frequencies are > zero, and then you get a warning about an invalid table. I also > removed "policy->freq_table = c->table", since validate_and_show does > this. > -Evan > The API is no longer supported, https://patchwork.kernel.org/patch/10320897/ If you are using the 4.14 kernel, you do need to replace -policy->freq_table = c->table; +cpufreq_table_validate_and_show(policy, c->table); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation. --