reset is handled by hwmod framework and so removing it
from the code.

Signed-off-by: Tarun Kanti DebBarma <tarun.ka...@ti.com>
Reviewed-by: Cousson, Benoit <b-cous...@ti.com>
---
 arch/arm/plat-omap/dmtimer.c |   42 ++----------------------------------------
 1 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 8950fcd..f9285b1 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -273,54 +273,18 @@ void omap_dm_timer_write_intr_reg(struct omap_dm_timer 
*timer, u32 reg,
        writel(value, timer->io_base + (reg & 0xff));
 }
 
-
-static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
-{
-       int c;
-
-       c = 0;
-       while (!(omap_dm_timer_read_reg(timer, OMAP_TIMER_SYS_STAT_REG) & 1)) {
-               c++;
-               if (c > 100000) {
-                       printk(KERN_ERR "Timer failed to reset\n");
-                       return;
-               }
-       }
-}
-
-static void omap_dm_timer_reset(struct omap_dm_timer *timer)
+static void omap_dm_timer_prepare(struct omap_dm_timer *timer)
 {
-       u32 l;
+       omap_dm_timer_enable(timer);
 
-       if (!cpu_class_is_omap2() || timer->id != 1) {
-               omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
-               omap_dm_timer_wait_for_reset(timer);
-       }
        omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
 
-       l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
-       l |= 0x02 << 3;  /* Set to smart-idle mode */
-       l |= 0x2 << 8;   /* Set clock activity to perserve f-clock on idle */
-
-       /*
-        * Enable wake-up on OMAP2 CPUs.
-        */
-       if (cpu_class_is_omap2())
-               l |= 1 << 2;
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
-
        /* Match hardware reset default of posted mode */
        omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
                        OMAP_TIMER_CTRL_POSTED);
        timer->posted = 1;
 }
 
-static void omap_dm_timer_prepare(struct omap_dm_timer *timer)
-{
-       omap_dm_timer_enable(timer);
-       omap_dm_timer_reset(timer);
-}
-
 struct omap_dm_timer *omap_dm_timer_request(void)
 {
        struct omap_dm_timer *timer = NULL, *t;
@@ -372,8 +336,6 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific);
 
 void omap_dm_timer_free(struct omap_dm_timer *timer)
 {
-       omap_dm_timer_enable(timer);
-       omap_dm_timer_reset(timer);
        omap_dm_timer_disable(timer);
 
        WARN_ON(!timer->reserved);
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to