]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/cpufreq/imx6q-cpufreq.c
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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 10 Oct 2017 23:56:25 +0000 (01:56 +0200)
commit2b3d58a3adca9b7dec9bd289c5c0fda82eeebfa8
treeb47716c0fafe1a578c3b5c3463da7f054a7bfe8c
parent05829d9431df1bf6de98679fbcfbad282c1c55a4
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm/mach-imx/mach-imx6q.c
drivers/cpufreq/imx6q-cpufreq.c