diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index ee5f38df477d..cbb908dc5cf0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2635,11 +2635,33 @@ static int __init _setup(struct omap_hwmod *oh, void *data) | |||
2635 | if (oh->_state != _HWMOD_STATE_INITIALIZED) | 2635 | if (oh->_state != _HWMOD_STATE_INITIALIZED) |
2636 | return 0; | 2636 | return 0; |
2637 | 2637 | ||
2638 | if (oh->parent_hwmod) { | ||
2639 | int r; | ||
2640 | |||
2641 | r = _enable(oh->parent_hwmod); | ||
2642 | WARN(r, "hwmod: %s: setup: failed to enable parent hwmod %s\n", | ||
2643 | oh->name, oh->parent_hwmod->name); | ||
2644 | } | ||
2645 | |||
2638 | _setup_iclk_autoidle(oh); | 2646 | _setup_iclk_autoidle(oh); |
2639 | 2647 | ||
2640 | if (!_setup_reset(oh)) | 2648 | if (!_setup_reset(oh)) |
2641 | _setup_postsetup(oh); | 2649 | _setup_postsetup(oh); |
2642 | 2650 | ||
2651 | if (oh->parent_hwmod) { | ||
2652 | u8 postsetup_state; | ||
2653 | |||
2654 | postsetup_state = oh->parent_hwmod->_postsetup_state; | ||
2655 | |||
2656 | if (postsetup_state == _HWMOD_STATE_IDLE) | ||
2657 | _idle(oh->parent_hwmod); | ||
2658 | else if (postsetup_state == _HWMOD_STATE_DISABLED) | ||
2659 | _shutdown(oh->parent_hwmod); | ||
2660 | else if (postsetup_state != _HWMOD_STATE_ENABLED) | ||
2661 | WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n", | ||
2662 | oh->parent_hwmod->name, postsetup_state); | ||
2663 | } | ||
2664 | |||
2643 | return 0; | 2665 | return 0; |
2644 | } | 2666 | } |
2645 | 2667 | ||