aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-09 11:18:09 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-10-09 11:22:53 -0400
commite1b8c05dccc7d3de8c49c92c41b2b5ac7d8275b2 (patch)
treedfd6309dfe943f2e8780c6e743bd3c5942a05c88
parent194444c52edd857210b3895e83ce45c64b58e251 (diff)
ARM: clean up TWD after previous patch
Rename feat_c3stop to twd_features to match the other variables in this file. Initialise it with the standard features that we always support, and arrange to set the CLOCK_EVT_FEAT_C3STOP when appropriate. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/smp_twd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 4c1aa61149bb..1bfa7a7f5533 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -33,7 +33,8 @@ static unsigned long twd_timer_rate;
33static DEFINE_PER_CPU(bool, percpu_setup_called); 33static DEFINE_PER_CPU(bool, percpu_setup_called);
34 34
35static struct clock_event_device __percpu *twd_evt; 35static struct clock_event_device __percpu *twd_evt;
36static int feat_c3stop; 36static unsigned int twd_features =
37 CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
37static int twd_ppi; 38static int twd_ppi;
38 39
39static int twd_shutdown(struct clock_event_device *clk) 40static int twd_shutdown(struct clock_event_device *clk)
@@ -294,8 +295,7 @@ static void twd_timer_setup(void)
294 writel_relaxed(0, twd_base + TWD_TIMER_CONTROL); 295 writel_relaxed(0, twd_base + TWD_TIMER_CONTROL);
295 296
296 clk->name = "local_timer"; 297 clk->name = "local_timer";
297 clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | 298 clk->features = twd_features;
298 feat_c3stop;
299 clk->rating = 350; 299 clk->rating = 350;
300 clk->set_state_shutdown = twd_shutdown; 300 clk->set_state_shutdown = twd_shutdown;
301 clk->set_state_periodic = twd_set_periodic; 301 clk->set_state_periodic = twd_set_periodic;
@@ -351,7 +351,7 @@ static int __init twd_local_timer_common_register(struct device_node *np)
351 351
352 twd_get_clock(np); 352 twd_get_clock(np);
353 if (!of_property_read_bool(np, "always-on")) 353 if (!of_property_read_bool(np, "always-on"))
354 feat_c3stop = CLOCK_EVT_FEAT_C3STOP; 354 twd_features |= CLOCK_EVT_FEAT_C3STOP;
355 355
356 /* 356 /*
357 * Immediately configure the timer on the boot CPU, unless we need 357 * Immediately configure the timer on the boot CPU, unless we need