* [PATCH] cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
@ 2020-02-11 11:58 Christoph Niedermaier
2020-02-12 4:12 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Niedermaier @ 2020-02-11 11:58 UTC (permalink / raw)
To: linux-arm-kernel, rjw
Cc: Christoph Niedermaier, Anson.Huang, viresh.kumar, shawnguo, festevam
imx6ul_opp_check_speed_grading is called for both i.MX6UL and i.MX6ULL.
Since the i.MX6ULL was introduced to a separate ocotp compatible node
later, it is possible that the i.MX6ULL has also dtbs with
"fsl,imx6ull-ocotp". On a system without nvmem-cell speed grade a
missing check on this node causes a driver fail without considering
the cpu speed grade.
This patch prevents unwanted cpu overclocking on i.MX6ULL with compatible
node "fsl,imx6ull-ocotp" in old dtbs without nvmem-cell speed grade.
Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull")
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
---
drivers/cpufreq/imx6q-cpufreq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 648a09a1778a..1fcbbd53a48a 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -281,6 +281,9 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp");
if (!np)
+ np = of_find_compatible_node(NULL, NULL,
+ "fsl,imx6ull-ocotp");
+ if (!np)
return -ENOENT;
base = of_iomap(np, 0);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
2020-02-11 11:58 [PATCH] cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL Christoph Niedermaier
@ 2020-02-12 4:12 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2020-02-12 4:12 UTC (permalink / raw)
To: Christoph Niedermaier
Cc: Anson.Huang, shawnguo, rjw, festevam, linux-arm-kernel
On 11-02-20, 12:58, Christoph Niedermaier wrote:
> imx6ul_opp_check_speed_grading is called for both i.MX6UL and i.MX6ULL.
> Since the i.MX6ULL was introduced to a separate ocotp compatible node
> later, it is possible that the i.MX6ULL has also dtbs with
> "fsl,imx6ull-ocotp". On a system without nvmem-cell speed grade a
> missing check on this node causes a driver fail without considering
> the cpu speed grade.
>
> This patch prevents unwanted cpu overclocking on i.MX6ULL with compatible
> node "fsl,imx6ull-ocotp" in old dtbs without nvmem-cell speed grade.
>
> Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull")
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> ---
> drivers/cpufreq/imx6q-cpufreq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index 648a09a1778a..1fcbbd53a48a 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -281,6 +281,9 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
>
> np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp");
> if (!np)
> + np = of_find_compatible_node(NULL, NULL,
> + "fsl,imx6ull-ocotp");
> + if (!np)
> return -ENOENT;
>
> base = of_iomap(np, 0);
Applied. Thanks.
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-12 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 11:58 [PATCH] cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL Christoph Niedermaier
2020-02-12 4:12 ` Viresh Kumar
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).