ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs
The previous implementation was racy in many locations, where the current status of the clockdomain was read out, some operations were executed, and the previous status info was used afterwards to decide next state for the clockdomain. Instead, fix the implementation of the allow_idle / deny_idle APIs to properly have usecounting support. This allows clean handling internally within the clockdomain core, and simplifies the usage also within hwmod. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
这个提交包含在:
@@ -114,6 +114,7 @@ struct omap_hwmod;
|
||||
* @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up
|
||||
* @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact
|
||||
* @usecount: Usecount tracking
|
||||
* @forcewake_count: Usecount for forcing the domain active
|
||||
* @node: list_head to link all clockdomains together
|
||||
*
|
||||
* @prcm_partition should be a macro from mach-omap2/prcm44xx.h (OMAP4 only)
|
||||
@@ -138,6 +139,7 @@ struct clockdomain {
|
||||
struct clkdm_dep *wkdep_srcs;
|
||||
struct clkdm_dep *sleepdep_srcs;
|
||||
int usecount;
|
||||
int forcewake_count;
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户