]> asedeno.scripts.mit.edu Git - linux.git/commit
cpufreq: imx6q: Move speed grading check to cpufreq driver
authorFabio Estevam <fabio.estevam@nxp.com>
Sat, 30 Sep 2017 15:16:46 +0000 (12:16 -0300)
committerShawn Guo <shawnguo@kernel.org>
Wed, 18 Oct 2017 02:08:21 +0000 (10:08 +0800)
commit8e2b04b019c824186548eadd70243dbb97a1675b
tree3477e4f642370096f9e8d4f18756705992d9f704
parent6879452a883bc985ef9a8f70eb55e870cfb0bb79
cpufreq: imx6q: Move speed grading check to cpufreq driver

On some i.MX6 SoCs (like i.MX6SL, i.MX6SX and i.MX6UL) that do not have
speed grading check, opp table will not be created in platform code,
so cpufreq driver prints the following error message:

cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)

However, this is not really an error in this case because the
imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
and if it fails, it means that platform code does not provide
OPP and then dev_pm_opp_of_add_table() will be called.

In order to avoid such confusing error message, move the speed grading
check from platform code to the imx6q-cpufreq driver.

This way the imx6q-cpufreq no longer has to check whether OPP table
is supplied by platform code.

Tested on a i.MX6Q and i.MX6UL based boards.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mach-imx6q.c
drivers/cpufreq/imx6q-cpufreq.c