Permalink
Browse files

jz4740_timer: Mask the "half" timer interrupts in plat_time_init(). T…

…his fixes a hang when booting on the Dingoo A320 in USB boot mode with the Rockbox USBtool.
  • Loading branch information...
1 parent 8765509 commit 08d2d24b276d180d4b086eaef64e802271bcb3d6 @mthuurne committed May 27, 2010
Showing with 13 additions and 0 deletions.
  1. +2 −0 arch/mips/jz4740/time.c
  2. +11 −0 arch/mips/jz4740/timer.h
View
@@ -136,8 +136,10 @@ void __init plat_time_init(void)
jz4740_timer_set_period(TIMER_CLOCKEVENT, jz4740_jiffies_per_tick);
jz4740_timer_irq_full_enable(TIMER_CLOCKEVENT);
+ jz4740_timer_irq_half_disable(TIMER_CLOCKEVENT);
jz4740_timer_irq_full_disable(TIMER_CLOCKSOURCE);
+ jz4740_timer_irq_half_disable(TIMER_CLOCKSOURCE);
jz4740_timer_set_period(TIMER_CLOCKSOURCE, 0xffff);
jz4740_timer_enable(TIMER_CLOCKEVENT);
View
@@ -122,6 +122,17 @@ static inline void jz4740_timer_irq_full_disable(unsigned int timer)
writel(JZ_TIMER_IRQ_FULL(timer), jz4740_timer_base + JZ_REG_TIMER_MASK_SET);
}
+static inline void jz4740_timer_irq_half_enable(unsigned int timer)
+{
+ writel(JZ_TIMER_IRQ_HALF(timer), jz4740_timer_base + JZ_REG_TIMER_FLAG_CLEAR);
+ writel(JZ_TIMER_IRQ_HALF(timer), jz4740_timer_base + JZ_REG_TIMER_MASK_CLEAR);
+}
+
+static inline void jz4740_timer_irq_half_disable(unsigned int timer)
+{
+ writel(JZ_TIMER_IRQ_HALF(timer), jz4740_timer_base + JZ_REG_TIMER_MASK_SET);
+}
+
static inline void jz4740_timer_set_ctrl(unsigned int timer, uint16_t ctrl)
{
writew(ctrl, jz4740_timer_base + JZ_REG_TIMER_CTRL(timer));

0 comments on commit 08d2d24

Please sign in to comment.