All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: timer-sp: ensure interrupt is cleared at sp804_of_init
@ 2014-09-17 11:34 ` Chanho Min
  0 siblings, 0 replies; 5+ messages in thread
From: Chanho Min @ 2014-09-17 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

sp804 may not be added to the tick device if the higher device is
already registered. In this case, If pending interrupt is existed
(usually It will be passed from the boot loader), inetrrupt is occured
without event_handler then it cause kernel panic. So Interrupts
should be cleared before clockevent is registered.

Changes since v1:
 - Move to sp804_of_init
 - Clear TIMER2 interrupt
 - Update commit log

Signed-off-by: Chanho Min <chanho.min@lge.com>
---
 arch/arm/common/timer-sp.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index fd6bff0..e3cc08e 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -226,6 +226,10 @@ static void __init sp804_of_init(struct device_node *np)
 	writel(0, base + TIMER_CTRL);
 	writel(0, base + TIMER_2_BASE + TIMER_CTRL);
 
+	/* Ensure interrupt is cleared */
+	writel(1, base + TIMER_INTCLR);
+	writel(1, base + TIMER_2_BASE + TIMER_INTCLR);
+
 	if (initialized || !of_device_is_available(np))
 		goto err;
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-18  7:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 11:34 [PATCH v2] ARM: timer-sp: ensure interrupt is cleared at sp804_of_init Chanho Min
2014-09-17 11:34 ` Chanho Min
2014-09-17 11:57 ` Russell King - ARM Linux
2014-09-17 11:57   ` Russell King - ARM Linux
2014-09-18  7:24   ` Chanho Min

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.