From: Hector Yuan <hector.yuan@mediatek.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Rob Herring" <robh+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Shawn Guo <shawnguo@kernel.org>, Li Yang <leoyang.li@nxp.com>,
Vinod Koul <vkoul@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Anson Huang <Anson.Huang@nxp.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
"Olof Johansson" <olof@lixom.net>, <linux-kernel@vger.kernel.org>,
<wsd_upstream@mediatek.com>
Subject: Re: [PATCH v2 1/2] cpufreq: mediatek-hw: Add support for Mediatek cpufreq HW driver
Date: Thu, 27 Aug 2020 16:58:05 +0800 [thread overview]
Message-ID: <1598518685.4204.8.camel@mtkswgap22> (raw)
In-Reply-To: <20200827042653.5ttsxnjjhpslmrcv@vireshk-i7>
On Thu, 2020-08-27 at 09:56 +0530, Viresh Kumar wrote:
> On 26-08-20, 20:57, Hector Yuan wrote:
> > On Mon, 2020-08-24 at 15:36 +0530, Viresh Kumar wrote:
> > > On 13-08-20, 15:07, Hector Yuan wrote:
> > > > CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=m
> > > > CONFIG_ARM_ARMADA_37XX_CPUFREQ=y
> > > > +CONFIG_ARM_MEDIATEK_CPUFREQ_HW=m
> > >
> > > What about a 'default m' in Kconfig itself ?
> > > OK, will update in V3.
>
> Hector, you need to remove (or not add) the right bracket (>) before the
> beginning of your lines. This makes it incredibly difficult to read.
OK, I get it. Sorry for the inconvenience.
> > > > + for (i = 0; i < LUT_MAX_ENTRIES; i++) {
> > > > + data = readl_relaxed(base + (i * LUT_ROW_SIZE));
> > > > + freq = FIELD_GET(LUT_FREQ, data) * 1000;
> > > > + volt = FIELD_GET(LUT_VOLT, data);
> > > > + if (freq != prev_freq) {
> > > > + table[i].frequency = freq;
> > > > + dev_pm_opp_add(cpu_dev, freq * 1000, volt);
> > >
> > > Why are you adding OPPs here and rather why using OPP specific stuff
> > > at all in the driver ?
> > > yes, the opp information is read from CPU HW engine.Then add it to the CPU dev OPP one by one.
>
> I asked a different question, why are you adding OPPs ? You don't need the OPPs
> at all in my opinion. You can just create the frequency table and that's it.
I just add OPP info to OPP framework so that others modules can get it
from OPP framework.
But like you said, I don't need it in this driver. I will remove this
code segment in V4.
I already send V3 yesterday but not including this modification.
> > > > + for_each_possible_cpu(cpu) {
> > > > + cpu_np = of_cpu_device_node_get(cpu);
> > > > + if (!cpu_np)
> > > > + continue;
> > > > +
> > > > + ret = of_parse_phandle_with_args(cpu_np, "mtk,freq-domain",
> > >
> > > Where are bindings of this node and how does this look ?
> > > Can refer to the same patch series, I split it to another patch.Each cpu will be group into one frequency domain for the CPU DVFS.
>
> That binding only defines "mediatek,cpufreq-hw" and not "mtk,freq-domain".
Please refer to the dt binding in V3, thank you. (lkml not show up yet,
so I post the below link instead)
https://www.spinics.net/lists/arm-kernel/msg832592.html
>
next prev parent reply other threads:[~2020-08-27 8:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 7:07 [PATCH v1] cpufreq: mediatek-hw: Add support for Mediatek cpufreq HW driver Hector Yuan
2020-08-13 7:07 ` [PATCH v2 1/2] " Hector Yuan
2020-08-24 10:06 ` Viresh Kumar
2020-08-26 12:57 ` Hector Yuan
2020-08-27 4:26 ` Viresh Kumar
2020-08-27 8:58 ` Hector Yuan [this message]
2020-08-13 7:07 ` [PATCH v2 2/2] dt-bindings: cpufreq: add bindings for MediaTek cpufreq HW Hector Yuan
2020-08-25 2:04 ` Rob Herring
2020-08-26 12:49 ` Hector Yuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1598518685.4204.8.camel@mtkswgap22 \
--to=hector.yuan@mediatek.com \
--cc=Anson.Huang@nxp.com \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=olof@lixom.net \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).