Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab2b7f3 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'clockevents/4.0-rc2' of...

Merge branch 'clockevents/4.0-rc2' of http://git.linaro.org/people/daniel.lezcano/linux

 into timers/urgent

Pull clockevents fixes from Daniel Lezcano:

 " These two patches fix a potential crash at boot time.

   - Fix setup_irq / clockevents_config_and_register init ordering in order to
     prevent to have an interrupt to be fired before the handler is set for sun5i
     and efm32. (Yongbae Park)"

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 13a7a6ac 1096be08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -225,12 +225,12 @@ static int __init efm32_clockevent_init(struct device_node *np)
	clock_event_ddata.base = base;
	clock_event_ddata.periodic_top = DIV_ROUND_CLOSEST(rate, 1024 * HZ);

	setup_irq(irq, &efm32_clock_event_irq);

	clockevents_config_and_register(&clock_event_ddata.evtdev,
					DIV_ROUND_CLOSEST(rate, 1024),
					0xf, 0xffff);

	setup_irq(irq, &efm32_clock_event_irq);

	return 0;

err_get_irq:
+4 −4
Original line number Diff line number Diff line
@@ -178,10 +178,6 @@ static void __init sun5i_timer_init(struct device_node *node)

	ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);

	ret = setup_irq(irq, &sun5i_timer_irq);
	if (ret)
		pr_warn("failed to setup irq %d\n", irq);

	/* Enable timer0 interrupt */
	val = readl(timer_base + TIMER_IRQ_EN_REG);
	writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG);
@@ -191,6 +187,10 @@ static void __init sun5i_timer_init(struct device_node *node)

	clockevents_config_and_register(&sun5i_clockevent, rate,
					TIMER_SYNC_TICKS, 0xffffffff);

	ret = setup_irq(irq, &sun5i_timer_irq);
	if (ret)
		pr_warn("failed to setup irq %d\n", irq);
}
CLOCKSOURCE_OF_DECLARE(sun5i_a13, "allwinner,sun5i-a13-hstimer",
		       sun5i_timer_init);