@@ -1304,9 +1304,13 @@ int omap_hwmod_enable(struct omap_hwmod *oh)
if (!oh)
return -EINVAL;
- mutex_lock(&omap_hwmod_mutex);
+ if (!(oh->flags & HWMOD_NO_IDLE_LOCKING))
+ mutex_lock(&omap_hwmod_mutex);
+
r = _enable(oh);
- mutex_unlock(&omap_hwmod_mutex);
+
+ if (!(oh->flags & HWMOD_NO_IDLE_LOCKING))
+ mutex_unlock(&omap_hwmod_mutex);
return r;
}
@@ -1323,9 +1327,13 @@ int omap_hwmod_idle(struct omap_hwmod *oh)
if (!oh)
return -EINVAL;
- mutex_lock(&omap_hwmod_mutex);
+ if (!(oh->flags & HWMOD_NO_IDLE_LOCKING))
+ mutex_lock(&omap_hwmod_mutex);
+
_idle(oh);
- mutex_unlock(&omap_hwmod_mutex);
+
+ if (!(oh->flags & HWMOD_NO_IDLE_LOCKING))
+ mutex_unlock(&omap_hwmod_mutex);
return 0;
}
@@ -360,6 +360,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_NO_OCP_AUTOIDLE (1 << 4)
#define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5)
#define HWMOD_NO_IDLEST (1 << 6)
+#define HWMOD_NO_IDLE_LOCKING (1 << 7)
/*
* omap_hwmod._int_flags definitions