mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-20 19:43:58 +08:00
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>
This commit is contained in:
parent
194444c52e
commit
e1b8c05dcc
@ -33,7 +33,8 @@ static unsigned long twd_timer_rate;
|
|||||||
static DEFINE_PER_CPU(bool, percpu_setup_called);
|
static DEFINE_PER_CPU(bool, percpu_setup_called);
|
||||||
|
|
||||||
static struct clock_event_device __percpu *twd_evt;
|
static struct clock_event_device __percpu *twd_evt;
|
||||||
static int feat_c3stop;
|
static unsigned int twd_features =
|
||||||
|
CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
|
||||||
static int twd_ppi;
|
static int twd_ppi;
|
||||||
|
|
||||||
static int twd_shutdown(struct clock_event_device *clk)
|
static int twd_shutdown(struct clock_event_device *clk)
|
||||||
@ -294,8 +295,7 @@ static void twd_timer_setup(void)
|
|||||||
writel_relaxed(0, twd_base + TWD_TIMER_CONTROL);
|
writel_relaxed(0, twd_base + TWD_TIMER_CONTROL);
|
||||||
|
|
||||||
clk->name = "local_timer";
|
clk->name = "local_timer";
|
||||||
clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
|
clk->features = twd_features;
|
||||||
feat_c3stop;
|
|
||||||
clk->rating = 350;
|
clk->rating = 350;
|
||||||
clk->set_state_shutdown = twd_shutdown;
|
clk->set_state_shutdown = twd_shutdown;
|
||||||
clk->set_state_periodic = twd_set_periodic;
|
clk->set_state_periodic = twd_set_periodic;
|
||||||
@ -351,7 +351,7 @@ static int __init twd_local_timer_common_register(struct device_node *np)
|
|||||||
|
|
||||||
twd_get_clock(np);
|
twd_get_clock(np);
|
||||||
if (!of_property_read_bool(np, "always-on"))
|
if (!of_property_read_bool(np, "always-on"))
|
||||||
feat_c3stop = CLOCK_EVT_FEAT_C3STOP;
|
twd_features |= CLOCK_EVT_FEAT_C3STOP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Immediately configure the timer on the boot CPU, unless we need
|
* Immediately configure the timer on the boot CPU, unless we need
|
||||||
|
Loading…
Reference in New Issue
Block a user