diff options
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 23 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 3 |
2 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 529142aff766..f673f808725f 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1441,6 +1441,25 @@ static int _enable(struct omap_hwmod *oh) | |||
1441 | 1441 | ||
1442 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); | 1442 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); |
1443 | 1443 | ||
1444 | /* | ||
1445 | * hwmods with HWMOD_INIT_NO_IDLE flag set are left | ||
1446 | * in enabled state at init. | ||
1447 | * Now that someone is really trying to enable them, | ||
1448 | * just ensure that the hwmod mux is set. | ||
1449 | */ | ||
1450 | if (oh->_int_flags & _HWMOD_SKIP_ENABLE) { | ||
1451 | /* | ||
1452 | * If the caller has mux data populated, do the mux'ing | ||
1453 | * which wouldn't have been done as part of the _enable() | ||
1454 | * done during setup. | ||
1455 | */ | ||
1456 | if (oh->mux) | ||
1457 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); | ||
1458 | |||
1459 | oh->_int_flags &= ~_HWMOD_SKIP_ENABLE; | ||
1460 | return 0; | ||
1461 | } | ||
1462 | |||
1444 | if (oh->_state != _HWMOD_STATE_INITIALIZED && | 1463 | if (oh->_state != _HWMOD_STATE_INITIALIZED && |
1445 | oh->_state != _HWMOD_STATE_IDLE && | 1464 | oh->_state != _HWMOD_STATE_IDLE && |
1446 | oh->_state != _HWMOD_STATE_DISABLED) { | 1465 | oh->_state != _HWMOD_STATE_DISABLED) { |
@@ -1744,8 +1763,10 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1744 | * it should be set by the core code as a runtime flag during startup | 1763 | * it should be set by the core code as a runtime flag during startup |
1745 | */ | 1764 | */ |
1746 | if ((oh->flags & HWMOD_INIT_NO_IDLE) && | 1765 | if ((oh->flags & HWMOD_INIT_NO_IDLE) && |
1747 | (postsetup_state == _HWMOD_STATE_IDLE)) | 1766 | (postsetup_state == _HWMOD_STATE_IDLE)) { |
1767 | oh->_int_flags |= _HWMOD_SKIP_ENABLE; | ||
1748 | postsetup_state = _HWMOD_STATE_ENABLED; | 1768 | postsetup_state = _HWMOD_STATE_ENABLED; |
1769 | } | ||
1749 | 1770 | ||
1750 | if (postsetup_state == _HWMOD_STATE_IDLE) | 1771 | if (postsetup_state == _HWMOD_STATE_IDLE) |
1751 | _idle(oh); | 1772 | _idle(oh); |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 8b372ede17c1..1a13c02118df 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -416,10 +416,13 @@ struct omap_hwmod_omap4_prcm { | |||
416 | * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module | 416 | * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module |
417 | * _HWMOD_WAKEUP_ENABLED: set when the omap_hwmod code has enabled ENAWAKEUP | 417 | * _HWMOD_WAKEUP_ENABLED: set when the omap_hwmod code has enabled ENAWAKEUP |
418 | * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached | 418 | * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached |
419 | * _HWMOD_SKIP_ENABLE: set if hwmod enabled during init (HWMOD_INIT_NO_IDLE) - | ||
420 | * causes the first call to _enable() to only update the pinmux | ||
419 | */ | 421 | */ |
420 | #define _HWMOD_NO_MPU_PORT (1 << 0) | 422 | #define _HWMOD_NO_MPU_PORT (1 << 0) |
421 | #define _HWMOD_WAKEUP_ENABLED (1 << 1) | 423 | #define _HWMOD_WAKEUP_ENABLED (1 << 1) |
422 | #define _HWMOD_SYSCONFIG_LOADED (1 << 2) | 424 | #define _HWMOD_SYSCONFIG_LOADED (1 << 2) |
425 | #define _HWMOD_SKIP_ENABLE (1 << 3) | ||
423 | 426 | ||
424 | /* | 427 | /* |
425 | * omap_hwmod._state definitions | 428 | * omap_hwmod._state definitions |