OMAP: hwmod: Do not exit the iteration if one clock init failed
authorBenoit Cousson <b-cousson@ti.com>
Thu, 20 May 2010 18:31:10 +0000 (12:31 -0600)
committerPaul Walmsley <paul@pwsan.com>
Thu, 20 May 2010 18:31:10 +0000 (12:31 -0600)
During the _init_clocks phase, the iteration is stopped but the
status is still change from _HWMOD_STATE_REGISTERED to
_HWMOD_STATE_CLKS_INITED.
Since the _setup phase will be done nevertheless, it might be
better to keep initializing the others clocks nodes and just
keep the warning.
It is much easier to debug when a important number of clocks
name are wrong during the early debug phase of a new platform.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c

index 5d3a3ea37422a1e5c652ff2639ee9a89ce3fcc93..b624ad64821236e9c3eb333fdcc9b9c6df332d97 100644 (file)
@@ -783,9 +783,10 @@ static int _init_clocks(struct omap_hwmod *oh)
        ret |= _init_interface_clks(oh);
        ret |= _init_opt_clks(oh);
 
-       oh->_state = _HWMOD_STATE_CLKS_INITED;
+       if (!ret)
+               oh->_state = _HWMOD_STATE_CLKS_INITED;
 
-       return ret;
+       return 0;
 }
 
 /**