Commit 76e5589e authored by Benoit Cousson's avatar Benoit Cousson Committed by Paul Walmsley

OMAP: hwmod: Force a softreset during _setup

Force the softreset of every IPs during the _setup phase.
IPs that cannot support softreset or that should not
be reset must set the HWMOD_INIT_NO_RESET flag in the
hwmod struct.
Signed-off-by: default avatarBenoit Cousson <b-cousson@ti.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Tested-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 5365efbe
...@@ -980,8 +980,8 @@ static int _reset(struct omap_hwmod *oh) ...@@ -980,8 +980,8 @@ static int _reset(struct omap_hwmod *oh)
/* clocks must be on for this operation */ /* clocks must be on for this operation */
if (oh->_state != _HWMOD_STATE_ENABLED) { if (oh->_state != _HWMOD_STATE_ENABLED) {
WARN(1, "omap_hwmod: %s: reset can only be entered from " pr_warning("omap_hwmod: %s: reset can only be entered from "
"enabled state\n", oh->name); "enabled state\n", oh->name);
return -EINVAL; return -EINVAL;
} }
...@@ -998,8 +998,8 @@ static int _reset(struct omap_hwmod *oh) ...@@ -998,8 +998,8 @@ static int _reset(struct omap_hwmod *oh)
MAX_MODULE_SOFTRESET_WAIT, c); MAX_MODULE_SOFTRESET_WAIT, c);
if (c == MAX_MODULE_SOFTRESET_WAIT) if (c == MAX_MODULE_SOFTRESET_WAIT)
WARN(1, "omap_hwmod: %s: softreset failed (waited %d usec)\n", pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
oh->name, MAX_MODULE_SOFTRESET_WAIT); oh->name, MAX_MODULE_SOFTRESET_WAIT);
else else
pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c); pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c);
...@@ -1198,12 +1198,12 @@ static int _setup(struct omap_hwmod *oh, void *data) ...@@ -1198,12 +1198,12 @@ static int _setup(struct omap_hwmod *oh, void *data)
} }
if (!(oh->flags & HWMOD_INIT_NO_RESET)) { if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
_reset(oh);
/* /*
* XXX Do the OCP_SYSCONFIG bits need to be * OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
* reprogrammed after a reset? If not, then this can * The _omap_hwmod_enable() function should be split to
* be removed. If they do, then probably the * avoid the rewrite of the OCP_SYSCONFIG register.
* _omap_hwmod_enable() function should be split to avoid the
* rewrite of the OCP_SYSCONFIG register.
*/ */
if (oh->class->sysc) { if (oh->class->sysc) {
_update_sysc_cache(oh); _update_sysc_cache(oh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment