cpuidle: initialize the broadcast timer framework
The commit 89878baa73f0f1c679355006bd8632e5d78f96c2 introduced the CPUIDLE_FLAG_TIMER_STOP flag where we specify a specific idle state stops the local timer. Now use this flag to check at init time if one state will need the broadcast timer and, in this case, setup the broadcast timer framework. That prevents multiple code duplication in the drivers. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
4dbad816fe
commit
a06df062a1
@@ -107,6 +107,8 @@ struct cpuidle_driver {
|
||||
|
||||
/* set to 1 to use the core cpuidle time keeping (for all states). */
|
||||
unsigned int en_core_tk_irqen:1;
|
||||
/* used by the cpuidle framework to setup the broadcast timer */
|
||||
unsigned int bctimer:1;
|
||||
/* states array must be ordered in decreasing power consumption */
|
||||
struct cpuidle_state states[CPUIDLE_STATE_MAX];
|
||||
int state_count;
|
||||
|
Reference in New Issue
Block a user