ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
authorRajendra Nayak <[email protected]>
Tue, 13 Mar 2012 17:25:24 +0000 (22:55 +0530)
committerPaul Walmsley <[email protected]>
Thu, 5 Apr 2012 08:59:32 +0000 (02:59 -0600)
omap_hwmod_softreset() does not seem to wait for reset status
after doing a softreset. Make it use _ocp_softreset() instead
which does this correctly.

Signed-off-by: Rajendra Nayak <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Anand Gadiyar <[email protected]>
Cc: Shubhrajyoti D <[email protected]>
Signed-off-by: Paul Walmsley <[email protected]>
arch/arm/mach-omap2/omap_hwmod.c

index d32c1ce4f3ab11bdf52bae012cce4d59016e76f4..72903d42ab0def83e63e275dce32339ed34a0884 100644 (file)
@@ -1901,20 +1901,10 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
  */
 int omap_hwmod_softreset(struct omap_hwmod *oh)
 {
-       u32 v;
-       int ret;
-
-       if (!oh || !(oh->_sysc_cache))
+       if (!oh)
                return -EINVAL;
 
-       v = oh->_sysc_cache;
-       ret = _set_softreset(oh, &v);
-       if (ret)
-               goto error;
-       _write_sysconfig(v, oh);
-
-error:
-       return ret;
+       return _ocp_softreset(oh);
 }
 
 /**