diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-10-07 15:56:29 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-10-07 15:56:29 -0400 |
commit | 2f6affe35c1d79e3524a6475ea2267535a252258 (patch) | |
tree | 0173a325eb2a804a228b77acffb4de46a6665700 | |
parent | 9414229c9c53d3604032aa80f3d2e9ba5770cd4a (diff) | |
parent | 1f174a1a2cdebc65138e6ed1448b842e73200bb5 (diff) |
Merge branch 'clockevents/4.20' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clockevent updates from Daniel Lezcano:
- Prefix file names with timer-* (Daniel Lezcano)
- Remove old CLOCKSOURCE_OF_DECLARE which was replaced by TIMER_OF_DECLARE
(Daniel Lezcano)
- Add reset control for dw_apb (Dinh Nguyen)
- Add the SPDX identifiers for the renesas and sh timers (Kuninori
Morimoto)
- Use %pOFn instead of device_node.name (Rob Herring)
- Fixup 64bits and clocksource width to 32b for sh_cmt (Sergei Shtylyov)
- Add the R-Car gen3 support (Sergei Shtylyov)
-rw-r--r-- | drivers/clocksource/dw_apb_timer_of.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c index fabaa29cc3a4..db410acd8964 100644 --- a/drivers/clocksource/dw_apb_timer_of.c +++ b/drivers/clocksource/dw_apb_timer_of.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
23 | #include <linux/of_irq.h> | 23 | #include <linux/of_irq.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/reset.h> | ||
25 | #include <linux/sched_clock.h> | 26 | #include <linux/sched_clock.h> |
26 | 27 | ||
27 | static void __init timer_get_base_and_rate(struct device_node *np, | 28 | static void __init timer_get_base_and_rate(struct device_node *np, |
@@ -29,6 +30,7 @@ static void __init timer_get_base_and_rate(struct device_node *np, | |||
29 | { | 30 | { |
30 | struct clk *timer_clk; | 31 | struct clk *timer_clk; |
31 | struct clk *pclk; | 32 | struct clk *pclk; |
33 | struct reset_control *rstc; | ||
32 | 34 | ||
33 | *base = of_iomap(np, 0); | 35 | *base = of_iomap(np, 0); |
34 | 36 | ||
@@ -36,6 +38,16 @@ static void __init timer_get_base_and_rate(struct device_node *np, | |||
36 | panic("Unable to map regs for %pOFn", np); | 38 | panic("Unable to map regs for %pOFn", np); |
37 | 39 | ||
38 | /* | 40 | /* |
41 | * Reset the timer if the reset control is available, wiping | ||
42 | * out the state the firmware may have left it | ||
43 | */ | ||
44 | rstc = of_reset_control_get(np, NULL); | ||
45 | if (!IS_ERR(rstc)) { | ||
46 | reset_control_assert(rstc); | ||
47 | reset_control_deassert(rstc); | ||
48 | } | ||
49 | |||
50 | /* | ||
39 | * Not all implementations use a periphal clock, so don't panic | 51 | * Not all implementations use a periphal clock, so don't panic |
40 | * if it's not present | 52 | * if it's not present |
41 | */ | 53 | */ |