Re: [PATCH] ARM: timer-sp: ensure interrupt is cleared at sp804_clockevents_init
From: Stephen Boyd
Date: Tue Sep 16 2014 - 21:09:29 EST
On 09/17, Chanho Min wrote:
> When sp804 is registerd as clock event device, it may not be added to
s/registerd/registered/
> tick device if the higher rated device is already registerd. In this case,
s/registerd/registered/
> for uncertan reason, inetrrupt is occured without event_handler it cause
s/inetrrupt/interrupt/
> kernel panic. So Interrupt should be cleared before clockevent is registered.
>
> Signed-off-by: Chanho Min <chanho.min@xxxxxxx>
> ---
> arch/arm/common/timer-sp.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
> index fd6bff0..b658873 100644
> --- a/arch/arm/common/timer-sp.c
> +++ b/arch/arm/common/timer-sp.c
> @@ -205,6 +205,8 @@ void __init __sp804_clockevents_init(void __iomem *base, unsigned int irq, struc
>
> writel(0, base + TIMER_CTRL);
>
> + /* Ensure interrupt is cleared */
> + writel(1, clkevt_base + TIMER_INTCLR);
> setup_irq(irq, &sp804_timer_irq);
> clockevents_config_and_register(evt, rate, 0xf, 0xffffffff);
Or just flip the order of clockevents_config_and_register() and
setup_irq()? We've done this in other clockevents drivers.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/