Received: by 10.192.165.148 with SMTP id m20csp432996imm; Thu, 3 May 2018 23:57:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZruHEZOU/4BFkAvKufm3HVMQz8sybloHzduNTXVUpzc9wS+Ycoun/mSv+xcN3uoOzV+cXon X-Received: by 2002:a63:78cf:: with SMTP id t198-v6mr21588041pgc.382.1525417069426; Thu, 03 May 2018 23:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525417069; cv=none; d=google.com; s=arc-20160816; b=tx/BXHblCLNHqgiWumBAURZCpgU6hyYVqFwoLyorfeIGq7d4pNv/b1ofX626ZjLIZq T+oJX3SUodBCpxagmH/ZSh14CVWXg3lJ7Ab6DeODUnzm7Ih1I4cJRCN0ExGWMfw/azhd xr3JX9fjFhOG9il3ztbdb7sbo+mdF8MlYBQWEjAE35lt4+5drmddVuVxfc3nD301WNtb 6K7XxOS53Frcev84UNjMJb60f17tklfMdJRt90mMZV6P/Kxs6V3tULOfh0LWmxqzLpbV 6jVKoVVc68UPiHM32QPLf5PDJxI9UMNhAxu/+ZDaMWGp29MhdaDyWIgEscwUI2kRmnzv 7WTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=mRQDxlGWHevPXVFD2se6OfEH+J4HMOQNkvE9f9cHwww=; b=MvkDI4G0Mdv4z4S1+qX8IrdgAiymUnk8pfTDgmqMAsM44uMZwyVT6QGXnNcufvkdQi NPjv+PtJYMrM4JzI+b9tXQCkBVxg82Q27ebCj0nZX0yoU3aoYADPLURBxSr7zHXVh6Zv RmtbFXDWvojn70rpTnCqRsGlUoEjLKymaqHU9wI2I8lhgwUUdnaowyuQCtsSg/01w3hZ FosEW/rT5kZk0q+7dUljLWdiTbAprO8C5WWtK1/niyDllfPkaRXfnUwhX5X8Q3+6gevV Na8BU7bD8VU0O/h950f8PqTdRmMuuoSu6uayO06ucFt5AgOJPT/ABR9V1e6PTjDgqlhB x4CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J7jaMC6u; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4-v6si6261793plk.321.2018.05.03.23.57.35; Thu, 03 May 2018 23:57:49 -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=@linaro.org header.s=google header.b=J7jaMC6u; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349AbeEDG5Q (ORCPT + 99 others); Fri, 4 May 2018 02:57:16 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46299 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbeEDG5M (ORCPT ); Fri, 4 May 2018 02:57:12 -0400 Received: by mail-pf0-f193.google.com with SMTP id p12so16691912pff.13 for ; Thu, 03 May 2018 23:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mRQDxlGWHevPXVFD2se6OfEH+J4HMOQNkvE9f9cHwww=; b=J7jaMC6uBThny3d35iYiPE50LbPHV3iU5y0oeLDpVh147fZ1bC4wn69N71why5Symc xV97wYnw1/h3/idUzyfffbBQLEkTd2MHfS5J5nqf5L0wzYON4SOmvoOaVmBzPi7P4VL7 dt0b01E4PrcEcXBi6bYkzlEk87Q6FnoSC7tnQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mRQDxlGWHevPXVFD2se6OfEH+J4HMOQNkvE9f9cHwww=; b=Rp+oFqBzX9+m+U+eqWYnuuG2tjiLOLKtyF54tMsWGBXdDuZEkeShrvSix6SxLlFVzy n2nY4id4sYIVd8s8DlzxhTtqR4+gcJDjOUVxHZdfI+ZDapnDDtgEiuJA1kgvSStOhY4m f5njifJehfsU17afq/S4Gu3Qy2VroQQcUYKN9HOppElkksflDQQnlERMtFysLVx3t1Dt Vx9gyBiren4BbSYJLyRVmfSiHY9fWShsD6GqN/euSDcybshSRznMLDoHIFtdtdnu+jz+ x922B3gjGz3uEmbqzezXE6JeSFE9gwEeKkOwa8IAjjs9QsqHA/Db4cl8hZUT3VbmmQeS U9eg== X-Gm-Message-State: ALQs6tC6tJAZu+QTuB4GBP/qg4oy98aQFEVTMc/fIaiba4RY7A1R6ayo a/Mt40zr+rUY0gEWo+5Jycsc6A== X-Received: by 2002:a17:902:30a3:: with SMTP id v32-v6mr27017550plb.123.1525417032135; Thu, 03 May 2018 23:57:12 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id k63sm42583602pfk.90.2018.05.03.23.57.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 23:57:11 -0700 (PDT) Date: Fri, 4 May 2018 12:27:09 +0530 From: Viresh Kumar To: ilialin@codeaurora.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: Re: [PATCH v5 12/14] cpufreq: Add Kryo CPU scaling driver Message-ID: <20180504065709.62kacfext6bbprlo@vireshk-i7> References: <1525348355-25471-1-git-send-email-ilialin@codeaurora.org> <1525348355-25471-13-git-send-email-ilialin@codeaurora.org> <20180504060827.7bddb53ln2ogwcvv@vireshk-i7> <002a01d3e373$6b6ee410$424cac30$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002a01d3e373$6b6ee410$424cac30$@codeaurora.org> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04-05-18, 09:44, ilialin@codeaurora.org wrote: > > > > -----Original Message----- > > From: Viresh Kumar > > Sent: Friday, May 4, 2018 09:08 > > To: Ilia Lin > > Cc: mturquette@baylibre.com; sboyd@kernel.org; robh@kernel.org; > > mark.rutland@arm.com; rjw@rjwysocki.net; lgirdwood@gmail.com; > > broonie@kernel.org; andy.gross@linaro.org; david.brown@linaro.org; > > catalin.marinas@arm.com; will.deacon@arm.com; linux-clk@vger.kernel.org; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > > pm@vger.kernel.org; linux-arm-msm@vger.kernel.org; linux- > > soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > > rnayak@codeaurora.org; amit.kucheria@linaro.org; > > nicolas.dechesne@linaro.org; celster@codeaurora.org; > > tfinkel@codeaurora.org > > Subject: Re: [PATCH v5 12/14] cpufreq: Add Kryo CPU scaling driver > > > > On 03-05-18, 14:52, Ilia Lin wrote: > > > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO > > > processors, the CPU ferequencies subset and voltage value of each OPP > > > varies based on the silicon variant in use. Qualcomm Process Voltage > > > Scaling Tables defines the voltage and frequency value based on the > > > msm-id in SMEM and speedbin blown in the efuse combination. > > > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the > > > SoC to provide the OPP framework with required information. > > > This is used to determine the voltage and frequency value for each OPP > > > of > > > operating-points-v2 table when it is parsed by the OPP framework. > > > > > > Signed-off-by: Ilia Lin > > > --- > > > drivers/cpufreq/Kconfig.arm | 11 +++ > > > drivers/cpufreq/Makefile | 1 + > > > drivers/cpufreq/cpufreq-dt-platdev.c | 3 + > > > drivers/cpufreq/qcom-cpufreq-kryo.c | 153 > > > +++++++++++++++++++++++++++++++++++ > > > 4 files changed, 168 insertions(+) > > > create mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c > > > > > > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > > > index de55c7d..f9da18c 100644 > > > --- a/drivers/cpufreq/Kconfig.arm > > > +++ b/drivers/cpufreq/Kconfig.arm > > > @@ -124,6 +124,17 @@ config ARM_OMAP2PLUS_CPUFREQ > > > depends on ARCH_OMAP2PLUS > > > default ARCH_OMAP2PLUS > > > > > > +config ARM_QCOM_CPUFREQ_KRYO > > > + tristate "Qualcomm Technologies, Inc. Kryo based CPUFreq" > > > > I don't see any reply to Sricharan's query on this being tristate. > > Why shouldn't we leave possibility to compile the cpufreq-dt built-in, and > the qcom-cpufreq-kryo module? I was not saying this is incorrect, all I am saying is that you never replied to a comment from one of the reviewers. And I don't see a reason why this should be a tristate really. cpufreq-dt is already capable of being a module, all your driver does is that it creates the cpufreq-dt platform device after setting the OPP hw properties.. Over that, have you ever tried inserting, then removing and inserting the driver module again? I feel it will fail. The reason is that you never provided an exit routine which can get rid of the platform device created in the first place. > > > + depends on QCOM_QFPROM > > > + depends on QCOM_SMEM > > > + select PM_OPP > > > + help > > > + This adds the CPUFreq driver for > > > + Qualcomm Technologies, Inc. Kryo SoC based boards. > > > + > > > + If in doubt, say N. > > > + > > > config ARM_S3C_CPUFREQ > > > bool > > > help > > > diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index > > > 8d24ade..fb4a2ec 100644 > > > --- a/drivers/cpufreq/Makefile > > > +++ b/drivers/cpufreq/Makefile > > > @@ -65,6 +65,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) += > > mvebu-cpufreq.o > > > obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o > > > obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o > > > obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o > > > +obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) += qcom-cpufreq- > > kryo.o > > > obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o > > > obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o > > > obj-$(CONFIG_ARM_S3C2416_CPUFREQ) += s3c2416-cpufreq.o > > > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c > > > b/drivers/cpufreq/cpufreq-dt-platdev.c > > > index 3b585e4..77d6ab8 100644 > > > --- a/drivers/cpufreq/cpufreq-dt-platdev.c > > > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c > > > @@ -118,6 +118,9 @@ > > > > > > { .compatible = "nvidia,tegra124", }, > > > > > > + { .compatible = "qcom,apq8096", }, > > > + { .compatible = "qcom,msm8996", }, > > > + > > > { .compatible = "st,stih407", }, > > > { .compatible = "st,stih410", }, > > > > > > diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c > > > b/drivers/cpufreq/qcom-cpufreq-kryo.c > > > new file mode 100644 > > > index 0000000..32371cc > > > --- /dev/null > > > +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c > > > @@ -0,0 +1,153 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. > > > > Incorrect multi line comment. > > This was done as per Bjorn's instruction. You haven't followed him correctly. What he asked for is: // SPDX... /* * XXXX */ What you have done is: // SPDX... /* XXXX */ -- viresh