[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <002b01d3f28a$0d033900$2709ab00$@codeaurora.org>
Date: Wed, 23 May 2018 14:34:41 +0300
From: <ilialin@...eaurora.org>
To: "'Viresh Kumar'" <viresh.kumar@...aro.org>,
"'Sudeep Holla'" <sudeep.holla@....com>
Cc: "'Viresh Kumar'" <vireshk@...nel.org>,
"'Nishanth Menon'" <nm@...com>,
"'Stephen Boyd'" <sboyd@...nel.org>,
"'Rob Herring'" <robh@...nel.org>,
"'Mark Rutland'" <mark.rutland@....com>,
"'Rafael J. Wysocki'" <rjw@...ysocki.net>,
<linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>,
"'Linux Kernel Mailing List'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v10 1/2] cpufreq: Add Kryo CPU scaling driver
> -----Original Message-----
> From: Viresh Kumar <viresh.kumar@...aro.org>
> Sent: Wednesday, May 23, 2018 14:31
> To: Ilia Lin <ilialin@...eaurora.org>
> Cc: Sudeep Holla <sudeep.holla@....com>; Viresh Kumar
> <vireshk@...nel.org>; Nishanth Menon <nm@...com>; Stephen Boyd
> <sboyd@...nel.org>; Rob Herring <robh@...nel.org>; Mark Rutland
> <mark.rutland@....com>; Rafael J. Wysocki <rjw@...ysocki.net>; linux-
> pm@...r.kernel.org; devicetree@...r.kernel.org; Linux Kernel Mailing List
> <linux-kernel@...r.kernel.org>
> Subject: Re: [PATCH v10 1/2] cpufreq: Add Kryo CPU scaling driver
>
> On 23 May 2018 at 16:36, <ilialin@...eaurora.org> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Sudeep Holla <sudeep.holla@....com>
> >> Sent: Wednesday, May 23, 2018 13:40
> >> To: Ilia Lin <ilialin@...eaurora.org>; vireshk@...nel.org; nm@...com;
> >> sboyd@...nel.org; robh@...nel.org; mark.rutland@....com;
> >> rjw@...ysocki.net; linux-pm@...r.kernel.org;
> >> devicetree@...r.kernel.org; linux-kernel@...r.kernel.org
> >> Cc: Sudeep Holla <sudeep.holla@....com>
> >> Subject: Re: [PATCH v10 1/2] cpufreq: Add Kryo CPU scaling driver
> >>
> >>
> >>
> >> On 23/05/18 10:40, Ilia Lin wrote:
> >> > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO
> >> > processors, the CPU frequency 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 <ilialin@...eaurora.org>
> >>
> >> [...]
> >>
> >> > + pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> >> > + if (!IS_ERR(pdev))
> >> > + return 0;
> >> > +
> >> > + ret = PTR_ERR(pdev);
> >> > + dev_err(cpu_dev, "Failed to register platform device\n");
> >> > +
> >> > +free_opp:
> >> > + for_each_possible_cpu(cpu) {
> >> > + if (IS_ERR_OR_NULL(opp_tables[cpu]))
> >> > + break;
> >> > + dev_pm_opp_put_supported_hw(opp_tables[cpu]);
> >> > + }
> >> > +free_np:
> >> > + of_node_put(np);
> >> > +
> >> > + return ret;
> >> > +}
> >> > +late_initcall(qcom_cpufreq_kryo_driver_init);
> >>
> >> Any particular reason why this *has* to be late initcall ?
> >> Please change it to module_initcall otherwise.
> >
> > The purpose is to give the cpufreq-dt the time to register the driver and
> only then my driver will add the platform device.
>
> That isn't required, the device and its driver can be registered in any order.
You are right. I already checked that in the code...
However, with module_init() the driver fails on reading the nvmem.
Powered by blists - more mailing lists