diff options
author | Christoph Niedermaier <cniedermaier@dh-electronics.com> | 2020-02-11 12:58:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-17 10:48:38 +0200 |
commit | 188d564270dc927a1122f06cac08165c858fdab2 (patch) | |
tree | dba57e8b8d74ca1cb73bafe6b55c33de6a4c3306 /drivers/cpufreq | |
parent | 9f18f4a61bcd05066aec237218d26532df88d3e6 (diff) | |
download | linux-stable-188d564270dc927a1122f06cac08165c858fdab2.tar.gz linux-stable-188d564270dc927a1122f06cac08165c858fdab2.tar.bz2 linux-stable-188d564270dc927a1122f06cac08165c858fdab2.zip |
cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
[ Upstream commit 36eb7dc1bd42fe5f850329c893768ff89b696fba ]
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>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index d8c3595e9023..a0cbbdfc7735 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -311,6 +311,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); |