Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp946530yba; Fri, 5 Apr 2019 23:10:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwccy1BSxH83EnYndnZKuY7LCT9IgUKHWLRUuRdZRtwEsXoj3/bLJP57BVtC7OkIR4z+LyL X-Received: by 2002:a17:902:8a84:: with SMTP id p4mr17447288plo.2.1554531002541; Fri, 05 Apr 2019 23:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554531002; cv=none; d=google.com; s=arc-20160816; b=PtLzqXphrhBoAdBRuH9ldkHrB7k5uTvUPi15NHojoFwaSJxO+WeJSB3JGKpHH/rXz0 +sCh4Aga0CUzw+atA7JJ0kvogGOh9mk9xbrkVrFB62WsDGaJCD7dLWQZ8/INR2Z/0MiW yBscnx8H2pJkc+HSc6FIiFAoqUxvHMWY5XR0Aw3eZhZUJlzHVkKyvTq0wCiRwQTxXRkA zi9+2c5iNc5egOcytk+iVkUXybvNTPs5czLW9yEhjU8b9j9mvmSotha1d7Yvb/RLgGa+ /+sMzPy4NkuOTd7kXUi4KfajFTl/r5/wpfSgme84P6V4Gknoxbh6Am9Q+PEh1fhgZfDZ 6sdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:subject:cc:to:from:date:message-id; bh=R0cBTNmYa5ZMa7v6+KWY6z9n/NLmb68qLhUTjr5EjE4=; b=xNjkFj1A6erhI6+kZL0uw/WtkBzrH4+rAZ5ZQTbCusipqXXOchDP7lx1dti2SIP9Qb l6dPvoFdYSG3TzRsobdKzUemOmeemyh3BDiMqVtXuw5s/xnxp/2NQr4CSgch7HMT+MmA a7Hh2G6MDUP1iICoBZ5mbA7+VQ98uEN5yuHulp5XZX7j5o1AMrL+884/hvFWWmyrTXto PQLJXEiCm6lzktfDZqyQPmfR/Zh4vnBb2sxCLBtMXNBdGL8zWI+OlOltj5IYAUn2JWtZ KM5vIuIaKSk4bzW+ii7Kg8pMqeG/dLgtgLAx1uRqd4n66pXpAFjcfJifqvn/nhgnF+1T tBdA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si21241462plf.356.2019.04.05.23.09.46; Fri, 05 Apr 2019 23:10:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbfDFGH3 (ORCPT + 99 others); Sat, 6 Apr 2019 02:07:29 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36013 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbfDFGH1 (ORCPT ); Sat, 6 Apr 2019 02:07:27 -0400 Received: by mail-pf1-f194.google.com with SMTP id z5so4457752pfn.3; Fri, 05 Apr 2019 23:07:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:cc:subject:references :mime-version:content-disposition:in-reply-to; bh=R0cBTNmYa5ZMa7v6+KWY6z9n/NLmb68qLhUTjr5EjE4=; b=m3icVLiL5JZAJJJFCJ+JLNQdpEJryBl5xXUoeR77OfBWhKLuAQwfZCtIBBBW3S4kpQ 0YJT5TCoInVqPvUV4NGuebHEHorIXRLQHD/W2zfUJEU34JuSJmx0ZbPVxk5TqsxBSbZP 1vv4c4RsJ20PkLs6IfJhgZ8hSyx8GZe+i7wcZYcwcYiJPI+4b4paBMejxcbVz/wBvXXI 6G/argBD+iU+NfCDAmJ0+voG1n/29V80S7br7dltL5NhJzIupW9VDvOHwbH98JCCF7vF YEF3ko8GzwM0V5VA/zuMeIIeG+Ki2pLkCinKX4NlZaK/MUp33mUrnv9lzZ8P8qSM0cth J0OA== X-Gm-Message-State: APjAAAUhqnrW008XIVBZIzCNCqvI8vJQ0TGiGZ4E+zjH090BML+jpVAj vGepuxZetw1Ljn1TvSuOGw== X-Received: by 2002:a65:6645:: with SMTP id z5mr16356135pgv.251.1554530846692; Fri, 05 Apr 2019 23:07:26 -0700 (PDT) Received: from localhost ([210.160.217.71]) by smtp.gmail.com with ESMTPSA id o76sm61402541pfa.156.2019.04.05.23.07.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Apr 2019 23:07:26 -0700 (PDT) Message-ID: <5ca8421e.1c69fb81.42211.e57b@mx.google.com> Date: Sat, 06 Apr 2019 01:07:23 -0500 From: Rob Herring To: Niklas Cassel Cc: Ilia Lin , Viresh Kumar , Nishanth Menon , Stephen Boyd , Mark Rutland , Andy Gross , David Brown , "Rafael J. Wysocki" , linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, Sricharan R , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/9] cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs References: <20190404050931.9812-1-niklas.cassel@linaro.org> <20190404050931.9812-3-niklas.cassel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404050931.9812-3-niklas.cassel@linaro.org> X-Mutt-References: <20190404050931.9812-3-niklas.cassel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 04, 2019 at 07:09:23AM +0200, Niklas Cassel wrote: > From: Sricharan R > > The kryo cpufreq driver reads the nvmem cell and uses that data to > populate the opps. There are other qcom cpufreq socs like krait which > does similar thing. Except for the interpretation of the read data, > rest of the driver is same for both the cases. So pull the common things > out for reuse. > > Signed-off-by: Sricharan R > Signed-off-by: Niklas Cassel > --- > ...ryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} | 16 +-- Please make DT bindings a separate patch. > drivers/cpufreq/Kconfig.arm | 4 +- > drivers/cpufreq/Makefile | 2 +- > ...om-cpufreq-kryo.c => qcom-cpufreq-nvmem.c} | 124 +++++++++++------- > 4 files changed, 85 insertions(+), 61 deletions(-) > rename Documentation/devicetree/bindings/opp/{kryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} (97%) > rename drivers/cpufreq/{qcom-cpufreq-kryo.c => qcom-cpufreq-nvmem.c} (69%) > > diff --git a/Documentation/devicetree/bindings/opp/kryo-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt > similarity index 97% > rename from Documentation/devicetree/bindings/opp/kryo-cpufreq.txt > rename to Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt > index c2127b96805a..f4a7123730c3 100644 > --- a/Documentation/devicetree/bindings/opp/kryo-cpufreq.txt > +++ b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt > @@ -1,13 +1,13 @@ > -Qualcomm Technologies, Inc. KRYO CPUFreq and OPP bindings > +Qualcomm Technologies, Inc. NVMEM CPUFreq and OPP bindings > =================================== > > -In Certain Qualcomm Technologies, Inc. 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. > +In Certain Qualcomm Technologies, Inc. SoCs like apq8096 and msm8996, > +the CPU frequencies subset and voltage value of each OPP varies based on > +the silicon variant in use. > Qualcomm Technologies, Inc. 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 > +The qcom-cpufreq-nvmem driver reads the msm-id and efuse value from the SoC > to provide the OPP framework with required information (existing HW bitmap). > 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. > @@ -19,7 +19,7 @@ In 'cpus' nodes: > > In 'operating-points-v2' table: > - compatible: Should be > - - 'operating-points-v2-kryo-cpu' for apq8096 and msm8996. > + - 'operating-points-v2-qcom-cpu' for apq8096 and msm8996. You can't just change this. In any case, it's just a string. Use it even if it applies to more than just kryo cpus. > - nvmem-cells: A phandle pointing to a nvmem-cells node representing the > efuse registers that has information about the > speedbin that is used to select the right frequency/voltage > @@ -127,7 +127,7 @@ Example 1: > }; > > cluster0_opp: opp_table0 { > - compatible = "operating-points-v2-kryo-cpu"; > + compatible = "operating-points-v2-qcom-cpu"; > nvmem-cells = <&speedbin_efuse>; > opp-shared; > > @@ -338,7 +338,7 @@ Example 1: > }; > > cluster1_opp: opp_table1 { > - compatible = "operating-points-v2-kryo-cpu"; > + compatible = "operating-points-v2-qcom-cpu"; > nvmem-cells = <&speedbin_efuse>; > opp-shared; >