|
@@ -2207,15 +2207,15 @@ static int _idle(struct omap_hwmod *oh)
|
|
|
|
|
|
pr_debug("omap_hwmod: %s: idling\n", oh->name);
|
|
|
|
|
|
+ if (_are_all_hardreset_lines_asserted(oh))
|
|
|
+ return 0;
|
|
|
+
|
|
|
if (oh->_state != _HWMOD_STATE_ENABLED) {
|
|
|
WARN(1, "omap_hwmod: %s: idle state can only be entered from enabled state\n",
|
|
|
oh->name);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- if (_are_all_hardreset_lines_asserted(oh))
|
|
|
- return 0;
|
|
|
-
|
|
|
if (oh->class->sysc)
|
|
|
_idle_sysc(oh);
|
|
|
_del_initiator_dep(oh, mpu_oh);
|
|
@@ -2262,6 +2262,9 @@ static int _shutdown(struct omap_hwmod *oh)
|
|
|
int ret, i;
|
|
|
u8 prev_state;
|
|
|
|
|
|
+ if (_are_all_hardreset_lines_asserted(oh))
|
|
|
+ return 0;
|
|
|
+
|
|
|
if (oh->_state != _HWMOD_STATE_IDLE &&
|
|
|
oh->_state != _HWMOD_STATE_ENABLED) {
|
|
|
WARN(1, "omap_hwmod: %s: disabled state can only be entered from idle, or enabled state\n",
|
|
@@ -2269,9 +2272,6 @@ static int _shutdown(struct omap_hwmod *oh)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- if (_are_all_hardreset_lines_asserted(oh))
|
|
|
- return 0;
|
|
|
-
|
|
|
pr_debug("omap_hwmod: %s: disabling\n", oh->name);
|
|
|
|
|
|
if (oh->class->pre_shutdown) {
|