|
@@ -45,6 +45,7 @@
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/bootmem.h>
|
|
#include <linux/bootmem.h>
|
|
|
|
|
|
|
|
+#include <plat/common.h>
|
|
#include <plat/cpu.h>
|
|
#include <plat/cpu.h>
|
|
#include <plat/clockdomain.h>
|
|
#include <plat/clockdomain.h>
|
|
#include <plat/powerdomain.h>
|
|
#include <plat/powerdomain.h>
|
|
@@ -736,7 +737,7 @@ static int _wait_target_ready(struct omap_hwmod *oh)
|
|
static int _reset(struct omap_hwmod *oh)
|
|
static int _reset(struct omap_hwmod *oh)
|
|
{
|
|
{
|
|
u32 r, v;
|
|
u32 r, v;
|
|
- int c;
|
|
|
|
|
|
+ int c = 0;
|
|
|
|
|
|
if (!oh->sysconfig ||
|
|
if (!oh->sysconfig ||
|
|
!(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) ||
|
|
!(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) ||
|
|
@@ -758,13 +759,9 @@ static int _reset(struct omap_hwmod *oh)
|
|
return r;
|
|
return r;
|
|
_write_sysconfig(v, oh);
|
|
_write_sysconfig(v, oh);
|
|
|
|
|
|
- c = 0;
|
|
|
|
- while (c < MAX_MODULE_RESET_WAIT &&
|
|
|
|
- !(omap_hwmod_readl(oh, oh->sysconfig->syss_offs) &
|
|
|
|
- SYSS_RESETDONE_MASK)) {
|
|
|
|
- udelay(1);
|
|
|
|
- c++;
|
|
|
|
- }
|
|
|
|
|
|
+ omap_test_timeout((omap_hwmod_readl(oh, oh->sysconfig->syss_offs) &
|
|
|
|
+ SYSS_RESETDONE_MASK),
|
|
|
|
+ MAX_MODULE_RESET_WAIT, c);
|
|
|
|
|
|
if (c == MAX_MODULE_RESET_WAIT)
|
|
if (c == MAX_MODULE_RESET_WAIT)
|
|
WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
|
|
WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
|