* [PATCH] cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus
@ 2017-12-11 13:19 Lucas Stach
2017-12-12 14:41 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2017-12-11 13:19 UTC (permalink / raw)
To: Rafael J . Wysocki, Viresh Kumar
Cc: linux-pm, Fabio Estevam, kernel, patchwork-lst
The commit moving the speed grading check to the cpufreq driver introduced
some additional checks, so the OPP disable is only attempted on SoCs where
those OPPs are present. The compatible checks are missing the QuadPlus
compatible, so invalid OPPs are not correctly disabled there.
Move both checks to a single condition, so we don't need to sprinkle even
more calls to of_machine_is_compatible().
Fixes: 2b3d58a3adca (cpufreq: imx6q: Move speed grading check to cpufreq driver)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/cpufreq/imx6q-cpufreq.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 628fe899cb48..d9b2c2de49c4 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -226,17 +226,18 @@ static void imx6q_opp_check_speed_grading(struct device *dev)
val >>= OCOTP_CFG3_SPEED_SHIFT;
val &= 0x3;
- if ((val != OCOTP_CFG3_SPEED_1P2GHZ) &&
- of_machine_is_compatible("fsl,imx6q"))
- 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");
+ if (val != OCOTP_CFG3_SPEED_1P2GHZ)
+ if (dev_pm_opp_disable(dev, 1200000000))
+ dev_warn(dev, "failed to disable 1.2GHz OPP\n");
}
iounmap(base);
put_node:
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus
2017-12-11 13:19 [PATCH] cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus Lucas Stach
@ 2017-12-12 14:41 ` Viresh Kumar
2017-12-17 18:06 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2017-12-12 14:41 UTC (permalink / raw)
To: Lucas Stach
Cc: Rafael J . Wysocki, linux-pm, Fabio Estevam, kernel, patchwork-lst
On 11-12-17, 14:19, Lucas Stach wrote:
> The commit moving the speed grading check to the cpufreq driver introduced
> some additional checks, so the OPP disable is only attempted on SoCs where
> those OPPs are present. The compatible checks are missing the QuadPlus
> compatible, so invalid OPPs are not correctly disabled there.
>
> Move both checks to a single condition, so we don't need to sprinkle even
> more calls to of_machine_is_compatible().
>
> Fixes: 2b3d58a3adca (cpufreq: imx6q: Move speed grading check to cpufreq driver)
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/cpufreq/imx6q-cpufreq.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus
2017-12-12 14:41 ` Viresh Kumar
@ 2017-12-17 18:06 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2017-12-17 18:06 UTC (permalink / raw)
To: Viresh Kumar, Lucas Stach; +Cc: linux-pm, Fabio Estevam, kernel, patchwork-lst
On Tuesday, December 12, 2017 3:41:33 PM CET Viresh Kumar wrote:
> On 11-12-17, 14:19, Lucas Stach wrote:
> > The commit moving the speed grading check to the cpufreq driver introduced
> > some additional checks, so the OPP disable is only attempted on SoCs where
> > those OPPs are present. The compatible checks are missing the QuadPlus
> > compatible, so invalid OPPs are not correctly disabled there.
> >
> > Move both checks to a single condition, so we don't need to sprinkle even
> > more calls to of_machine_is_compatible().
> >
> > Fixes: 2b3d58a3adca (cpufreq: imx6q: Move speed grading check to cpufreq driver)
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> > drivers/cpufreq/imx6q-cpufreq.c | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-17 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 13:19 [PATCH] cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus Lucas Stach
2017-12-12 14:41 ` Viresh Kumar
2017-12-17 18:06 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.