ARM: OMAP3: Fix I/O chain clock line assertion timed out error
[cascardo/linux.git] / arch / arm / mach-omap2 / omap_hwmod.c
index 6c074f3..9e91a4e 100644 (file)
@@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void)
 
        spin_lock_irqsave(&io_chain_lock, flags);
 
-       if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl())
+       if (cpu_is_omap34xx())
                omap3xxx_prm_reconfigure_io_chain();
        else if (cpu_is_omap44xx())
                omap44xx_prm_reconfigure_io_chain();
@@ -2185,6 +2185,8 @@ static int _enable(struct omap_hwmod *oh)
                         oh->mux->pads_dynamic))) {
                omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED);
                _reconfigure_io_chain();
+       } else if (oh->flags & HWMOD_FORCE_MSTANDBY) {
+               _reconfigure_io_chain();
        }
 
        _add_initiator_dep(oh, mpu_oh);
@@ -2291,6 +2293,8 @@ static int _idle(struct omap_hwmod *oh)
        if (oh->mux && oh->mux->pads_dynamic) {
                omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE);
                _reconfigure_io_chain();
+       } else if (oh->flags & HWMOD_FORCE_MSTANDBY) {
+               _reconfigure_io_chain();
        }
 
        oh->_state = _HWMOD_STATE_IDLE;
@@ -3345,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
        if (!ois)
                return 0;
 
+       if (ois[0] == NULL) /* Empty list */
+               return 0;
+
        if (!linkspace) {
                if (_alloc_linkspace(ois)) {
                        pr_err("omap_hwmod: could not allocate link space\n");