OpenCloudOS-Kernel/drivers/opp
Viresh Kumar 283d55e68d OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes
When two or more devices are sharing their clock and voltage rails, they
share the same OPP table. But there are some corner cases where the OPP
core incorrectly creates separate OPP tables for them.

For example, CPU 0 and 1 share clock/voltage rails. The platform
specific code calls dev_pm_opp_set_regulators() for CPU0 and the OPP
core creates an OPP table for it (the individual OPPs aren't initialized
as of now). The same is repeated for CPU1 then. Because
_opp_get_opp_table() doesn't compare DT node pointers currently, it
fails to find the link between CPU0 and CPU1 and so creates a new OPP
table.

Fix this by calling _managed_opp() from _opp_get_opp_table().
_managed_opp() gain an additional argument (index) to get the right node
pointer. This resulted in simplifying code in _of_add_opp_table_v2() as
well.

Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2018-10-01 15:00:31 +05:30
..
Kconfig
Makefile PM / OPP: Add ti-opp-supply driver 2017-12-17 19:17:44 +01:00
core.c OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes 2018-10-01 15:00:31 +05:30
cpu.c OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() 2018-09-19 14:56:45 -07:00
debugfs.c PM / OPP: "opp-hz" is optional for power domains 2018-05-09 10:15:18 +05:30
of.c OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes 2018-10-01 15:00:31 +05:30
opp.h OPP: Prevent creating multiple OPP tables for devices sharing OPP nodes 2018-10-01 15:00:31 +05:30
ti-opp-supply.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00