diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-30 10:37:08 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-30 10:37:08 -0400 |
commit | 6e0aa8018f9c676b115b7ca6c20a056fc57c68a9 (patch) | |
tree | b35393574b48dcc05c99599add7f8b0015de3913 /drivers/clocksource/timer-sun5i.c | |
parent | 1ff27a3443addb19af609245b218fa510c7d37dd (diff) | |
parent | e42391cd048809d903291d07f86ed3934ce138e9 (diff) |
Merge tag 'v4.0-rc6' into drm-intel-next
Backmerge Linux 4.0-rc6 because conflicts are (again) getting out of
hand. To make sure we don't lose any bugfixes from the 4.0-rc5-rc6
flurry of patches we've applied them all to -next too.
Conflicts:
drivers/gpu/drm/i915/intel_display.c
Always take the version from -next, we've already handled all
conflicts with explicit cherrypicking.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/clocksource/timer-sun5i.c')
-rw-r--r-- | drivers/clocksource/timer-sun5i.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c index 02268448dc85..58597fbcc046 100644 --- a/drivers/clocksource/timer-sun5i.c +++ b/drivers/clocksource/timer-sun5i.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/irqreturn.h> | 18 | #include <linux/irqreturn.h> |
19 | #include <linux/reset.h> | 19 | #include <linux/reset.h> |
20 | #include <linux/sched_clock.h> | ||
21 | #include <linux/of.h> | 20 | #include <linux/of.h> |
22 | #include <linux/of_address.h> | 21 | #include <linux/of_address.h> |
23 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
@@ -137,11 +136,6 @@ static struct irqaction sun5i_timer_irq = { | |||
137 | .dev_id = &sun5i_clockevent, | 136 | .dev_id = &sun5i_clockevent, |
138 | }; | 137 | }; |
139 | 138 | ||
140 | static u64 sun5i_timer_sched_read(void) | ||
141 | { | ||
142 | return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1)); | ||
143 | } | ||
144 | |||
145 | static void __init sun5i_timer_init(struct device_node *node) | 139 | static void __init sun5i_timer_init(struct device_node *node) |
146 | { | 140 | { |
147 | struct reset_control *rstc; | 141 | struct reset_control *rstc; |
@@ -172,16 +166,11 @@ static void __init sun5i_timer_init(struct device_node *node) | |||
172 | writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD, | 166 | writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD, |
173 | timer_base + TIMER_CTL_REG(1)); | 167 | timer_base + TIMER_CTL_REG(1)); |
174 | 168 | ||
175 | sched_clock_register(sun5i_timer_sched_read, 32, rate); | ||
176 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name, | 169 | clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name, |
177 | rate, 340, 32, clocksource_mmio_readl_down); | 170 | rate, 340, 32, clocksource_mmio_readl_down); |
178 | 171 | ||
179 | ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); | 172 | ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); |
180 | 173 | ||
181 | ret = setup_irq(irq, &sun5i_timer_irq); | ||
182 | if (ret) | ||
183 | pr_warn("failed to setup irq %d\n", irq); | ||
184 | |||
185 | /* Enable timer0 interrupt */ | 174 | /* Enable timer0 interrupt */ |
186 | val = readl(timer_base + TIMER_IRQ_EN_REG); | 175 | val = readl(timer_base + TIMER_IRQ_EN_REG); |
187 | writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); | 176 | writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); |
@@ -191,6 +180,10 @@ static void __init sun5i_timer_init(struct device_node *node) | |||
191 | 180 | ||
192 | clockevents_config_and_register(&sun5i_clockevent, rate, | 181 | clockevents_config_and_register(&sun5i_clockevent, rate, |
193 | TIMER_SYNC_TICKS, 0xffffffff); | 182 | TIMER_SYNC_TICKS, 0xffffffff); |
183 | |||
184 | ret = setup_irq(irq, &sun5i_timer_irq); | ||
185 | if (ret) | ||
186 | pr_warn("failed to setup irq %d\n", irq); | ||
194 | } | 187 | } |
195 | CLOCKSOURCE_OF_DECLARE(sun5i_a13, "allwinner,sun5i-a13-hstimer", | 188 | CLOCKSOURCE_OF_DECLARE(sun5i_a13, "allwinner,sun5i-a13-hstimer", |
196 | sun5i_timer_init); | 189 | sun5i_timer_init); |