diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-09-21 12:34:11 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-09-21 17:12:40 -0400 |
commit | 76e5589e5b7cd0fd589264ab193f10550e1d8ab6 (patch) | |
tree | 2c84e13d627942d2f847896a2c350b6344754942 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 5365efbe29250a227502256cc912351fe2157b42 (diff) |
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: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index f4a569c74700..3e90984faca0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -980,8 +980,8 @@ static int _reset(struct omap_hwmod *oh) | |||
980 | 980 | ||
981 | /* clocks must be on for this operation */ | 981 | /* clocks must be on for this operation */ |
982 | if (oh->_state != _HWMOD_STATE_ENABLED) { | 982 | if (oh->_state != _HWMOD_STATE_ENABLED) { |
983 | WARN(1, "omap_hwmod: %s: reset can only be entered from " | 983 | pr_warning("omap_hwmod: %s: reset can only be entered from " |
984 | "enabled state\n", oh->name); | 984 | "enabled state\n", oh->name); |
985 | return -EINVAL; | 985 | return -EINVAL; |
986 | } | 986 | } |
987 | 987 | ||
@@ -998,8 +998,8 @@ static int _reset(struct omap_hwmod *oh) | |||
998 | MAX_MODULE_SOFTRESET_WAIT, c); | 998 | MAX_MODULE_SOFTRESET_WAIT, c); |
999 | 999 | ||
1000 | if (c == MAX_MODULE_SOFTRESET_WAIT) | 1000 | if (c == MAX_MODULE_SOFTRESET_WAIT) |
1001 | WARN(1, "omap_hwmod: %s: softreset failed (waited %d usec)\n", | 1001 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", |
1002 | oh->name, MAX_MODULE_SOFTRESET_WAIT); | 1002 | oh->name, MAX_MODULE_SOFTRESET_WAIT); |
1003 | else | 1003 | else |
1004 | pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c); | 1004 | pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c); |
1005 | 1005 | ||
@@ -1198,12 +1198,12 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1198 | } | 1198 | } |
1199 | 1199 | ||
1200 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) { | 1200 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) { |
1201 | _reset(oh); | ||
1202 | |||
1201 | /* | 1203 | /* |
1202 | * XXX Do the OCP_SYSCONFIG bits need to be | 1204 | * OCP_SYSCONFIG bits need to be reprogrammed after a softreset. |
1203 | * reprogrammed after a reset? If not, then this can | 1205 | * The _omap_hwmod_enable() function should be split to |
1204 | * be removed. If they do, then probably the | 1206 | * avoid the rewrite of the OCP_SYSCONFIG register. |
1205 | * _omap_hwmod_enable() function should be split to avoid the | ||
1206 | * rewrite of the OCP_SYSCONFIG register. | ||
1207 | */ | 1207 | */ |
1208 | if (oh->class->sysc) { | 1208 | if (oh->class->sysc) { |
1209 | _update_sysc_cache(oh); | 1209 | _update_sysc_cache(oh); |