提交 1eaff710 编写于 作者: J Jon Hunter

ARM: OMAP: Don't restore DMTIMER interrupt status register

Restoring the timer interrupt status is not possible because writing a 1 to any
bit in the register clears that bit if set and writing a 0 has no affect.
Furthermore, if an interrupt is pending when someone attempts to disable a
timer, the timer will fail to transition to the idle state and hence it's
context will not be lost. Users should take care to service all interrupts
before disabling the timer.
Signed-off-by: NJon Hunter <jon-hunter@ti.com>
Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
上级 d3004bb4
...@@ -83,7 +83,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, ...@@ -83,7 +83,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
static void omap_timer_restore_context(struct omap_dm_timer *timer) static void omap_timer_restore_context(struct omap_dm_timer *timer)
{ {
__raw_writel(timer->context.tisr, timer->irq_stat);
omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG,
timer->context.twer); timer->context.twer);
omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG,
...@@ -440,7 +439,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer) ...@@ -440,7 +439,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
*/ */
timer->context.tclr = timer->context.tclr =
omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
timer->context.tisr = __raw_readl(timer->irq_stat);
omap_dm_timer_disable(timer); omap_dm_timer_disable(timer);
return 0; return 0;
} }
...@@ -684,8 +682,7 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) ...@@ -684,8 +682,7 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
return -EINVAL; return -EINVAL;
__omap_dm_timer_write_status(timer, value); __omap_dm_timer_write_status(timer, value);
/* Save the context */
timer->context.tisr = value;
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
......
...@@ -84,7 +84,6 @@ struct omap_dm_timer; ...@@ -84,7 +84,6 @@ struct omap_dm_timer;
struct timer_regs { struct timer_regs {
u32 tidr; u32 tidr;
u32 tisr;
u32 tier; u32 tier;
u32 twer; u32 twer;
u32 tclr; u32 tclr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册