* [PATCH] cpufreq: imx6q-cpufreq: Fix speed grading check for imx6qp
@ 2017-12-19 15:56 Stefan Riedmueller
2017-12-19 17:02 ` Lucas Stach
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Riedmueller @ 2017-12-19 15:56 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, linux-kernel, fabio.estevam, Stefan Riedmueller
Add compatibility for the i.MX 6QuadPlus to make it behave like the
i.MX 6Quad, as both SOCs use the same operating points. Otherwise the
i.MX 6QuadPlus tries to run with 1.2 GHz even though it only
supports 1 GHz.
Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
---
drivers/cpufreq/imx6q-cpufreq.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 628fe89..5ca1988 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -218,7 +218,7 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
* SPEED_GRADING[1:0] defines the max speed of ARM:
* 2b'11: 1200000000Hz;
* 2b'10: 996000000Hz;
- * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz.
+ * 2b'01: 852000000Hz; -- i.MX6Q/QP Only, exclusive with 996MHz.
* 2b'00: 792000000Hz;
* We need to set the max speed of ARM according to fuse map.
*/
@@ -227,13 +227,15 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
val &= 0x3;
if ((val != OCOTP_CFG3_SPEED_1P2GHZ) &&
- of_machine_is_compatible("fsl,imx6q"))
+ (of_machine_is_compatible("fsl,imx6q") ||
+ of_machine_is_compatible("fsl,imx6qp")))
if (dev_pm_opp_disable(dev, 1200000000))
dev_warn(dev, "failed to disable 1.2GHz OPP\n");
if (val < OCOTP_CFG3_SPEED_996MHZ)
if (dev_pm_opp_disable(dev, 996000000))
dev_warn(dev, "failed to disable 996MHz OPP\n");
- if (of_machine_is_compatible("fsl,imx6q")) {
+ if (of_machine_is_compatible("fsl,imx6q") ||
+ of_machine_is_compatible("fsl,imx6qp")) {
if (val != OCOTP_CFG3_SPEED_852MHZ)
if (dev_pm_opp_disable(dev, 852000000))
dev_warn(dev, "failed to disable 852MHz OPP\n");
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cpufreq: imx6q-cpufreq: Fix speed grading check for imx6qp
2017-12-19 15:56 [PATCH] cpufreq: imx6q-cpufreq: Fix speed grading check for imx6qp Stefan Riedmueller
@ 2017-12-19 17:02 ` Lucas Stach
2017-12-21 7:34 ` Stefan Riedmüller
0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2017-12-19 17:02 UTC (permalink / raw)
To: Stefan Riedmueller, rjw, viresh.kumar
Cc: linux-pm, linux-kernel, fabio.estevam
Am Dienstag, den 19.12.2017, 16:56 +0100 schrieb Stefan Riedmueller:
> Add compatibility for the i.MX 6QuadPlus to make it behave like the
> i.MX 6Quad, as both SOCs use the same operating points. Otherwise the
> i.MX 6QuadPlus tries to run with 1.2 GHz even though it only
> supports 1 GHz.
There is already an applied patch to fix this issue:
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=ccc153a6de1f7741b5ef7c996f9be133772b2092
Regards,
Lucas
> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
> ---
> drivers/cpufreq/imx6q-cpufreq.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index 628fe89..5ca1988 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -218,7 +218,7 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
> > * SPEED_GRADING[1:0] defines the max speed of ARM:
> > * 2b'11: 1200000000Hz;
> > * 2b'10: 996000000Hz;
> > - * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz.
> > + * 2b'01: 852000000Hz; -- i.MX6Q/QP Only, exclusive with 996MHz.
> > * 2b'00: 792000000Hz;
> > * We need to set the max speed of ARM according to fuse map.
> > */
> @@ -227,13 +227,15 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
> > val &= 0x3;
>
> > if ((val != OCOTP_CFG3_SPEED_1P2GHZ) &&
> > - of_machine_is_compatible("fsl,imx6q"))
> > + (of_machine_is_compatible("fsl,imx6q") ||
> > + of_machine_is_compatible("fsl,imx6qp")))
> > if (dev_pm_opp_disable(dev, 1200000000))
> > dev_warn(dev, "failed to disable 1.2GHz OPP\n");
> > if (val < OCOTP_CFG3_SPEED_996MHZ)
> > if (dev_pm_opp_disable(dev, 996000000))
> > dev_warn(dev, "failed to disable 996MHz OPP\n");
> > - if (of_machine_is_compatible("fsl,imx6q")) {
> > + if (of_machine_is_compatible("fsl,imx6q") ||
> > + of_machine_is_compatible("fsl,imx6qp")) {
> > if (val != OCOTP_CFG3_SPEED_852MHZ)
> > if (dev_pm_opp_disable(dev, 852000000))
> > dev_warn(dev, "failed to disable 852MHz OPP\n");
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cpufreq: imx6q-cpufreq: Fix speed grading check for imx6qp
2017-12-19 17:02 ` Lucas Stach
@ 2017-12-21 7:34 ` Stefan Riedmüller
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Riedmüller @ 2017-12-21 7:34 UTC (permalink / raw)
To: Lucas Stach, rjw, viresh.kumar; +Cc: linux-pm, linux-kernel, fabio.estevam
Hi,
On 19.12.2017 18:02, Lucas Stach wrote:
> Am Dienstag, den 19.12.2017, 16:56 +0100 schrieb Stefan Riedmueller:
>> Add compatibility for the i.MX 6QuadPlus to make it behave like the
>> i.MX 6Quad, as both SOCs use the same operating points. Otherwise the
>> i.MX 6QuadPlus tries to run with 1.2 GHz even though it only
>> supports 1 GHz.
> There is already an applied patch to fix this issue:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=ccc153a6de1f7741b5ef7c996f9be133772b2092
>
> Regards,
> Lucas
Sorry, I missed that.
So please drop this patch.
Thanks,
Stefan
>> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
>> ---
>> drivers/cpufreq/imx6q-cpufreq.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
>> index 628fe89..5ca1988 100644
>> --- a/drivers/cpufreq/imx6q-cpufreq.c
>> +++ b/drivers/cpufreq/imx6q-cpufreq.c
>> @@ -218,7 +218,7 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
>>> * SPEED_GRADING[1:0] defines the max speed of ARM:
>>> * 2b'11: 1200000000Hz;
>>> * 2b'10: 996000000Hz;
>>> - * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz.
>>> + * 2b'01: 852000000Hz; -- i.MX6Q/QP Only, exclusive with 996MHz.
>>> * 2b'00: 792000000Hz;
>>> * We need to set the max speed of ARM according to fuse map.
>>> */
>> @@ -227,13 +227,15 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
>>> val &= 0x3;
>>
>>> if ((val != OCOTP_CFG3_SPEED_1P2GHZ) &&
>>> - of_machine_is_compatible("fsl,imx6q"))
>>> + (of_machine_is_compatible("fsl,imx6q") ||
>>> + of_machine_is_compatible("fsl,imx6qp")))
>>> if (dev_pm_opp_disable(dev, 1200000000))
>>> dev_warn(dev, "failed to disable 1.2GHz OPP\n");
>>> if (val < OCOTP_CFG3_SPEED_996MHZ)
>>> if (dev_pm_opp_disable(dev, 996000000))
>>> dev_warn(dev, "failed to disable 996MHz OPP\n");
>>> - if (of_machine_is_compatible("fsl,imx6q")) {
>>> + if (of_machine_is_compatible("fsl,imx6q") ||
>>> + of_machine_is_compatible("fsl,imx6qp")) {
>>> if (val != OCOTP_CFG3_SPEED_852MHZ)
>>> if (dev_pm_opp_disable(dev, 852000000))
>>> dev_warn(dev, "failed to disable 852MHz OPP\n");
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-21 7:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 15:56 [PATCH] cpufreq: imx6q-cpufreq: Fix speed grading check for imx6qp Stefan Riedmueller
2017-12-19 17:02 ` Lucas Stach
2017-12-21 7:34 ` Stefan Riedmüller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®