ARM: OMAP: dmtimer: fix missing content/correction in low-power mode support
authorTarun Kanti DebBarma <tarun.kanti@ti.com>
Tue, 6 Mar 2012 00:11:00 +0000 (16:11 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 6 Mar 2012 00:11:00 +0000 (16:11 -0800)
commitdffc9daeec5e7e2a5bfcb7cbb5abf3a9dc64ffe1
treead6fdcb1d6a82ba7dceb10337c89191977d20ca4
parentd82ba9954b6b2c4ac91ec6f6f42be8c5215d0619
ARM: OMAP: dmtimer: fix missing content/correction in low-power mode support

Since omap_dm_timer_write_reg/__omap_dm_timer_write is now modified
to use timer->func_base OCP_CFG should not use this wrapper anymore.
Instead use __raw_writel() directly and use timer->io_base instead
to write to OCP_CFG.

The timer->sys_stat is valid only if timer->revision is 1. In the
context restore function make this correction.

Save the contexts and loss count when timer is stopped.
Also, disable the clock. Else, clock usecount would become imbalanced.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Tested-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/dmtimer.c