/* Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh OCP_SYSCONFIG register. Must be called with omap_hwmod_mutex held. Returns -EINVAL if the hwmod is in the wrong state or returns 0.  */
static int _setup(struct omap_hwmod *oh)
/* Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh OCP_SYSCONFIG register. Must be called with omap_hwmod_mutex held. Returns -EINVAL if the hwmod is in the wrong state or returns 0.  */
static int _setup(struct omap_hwmod *oh)
{
	struct omap_hwmod_ocp_if *os;
	int i;
	if (!oh)
		return -EINVAL;
	if (oh->slaves_cnt > 0) {
		for (i = 0, os = *oh->slaves; i < oh->slaves_cnt; i++, os++) {
			struct clk *c = os->_clk;
			if (!c || IS_ERR(c))
				continue;
			if (os->flags & OCPIF_SWSUP_IDLE) {
			} else {
				clk_enable(c);
			}
		}
	}
	oh->_state = _HWMOD_STATE_INITIALIZED;
	_enable(oh);
	if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
		if (oh->sysconfig) {
			_update_sysc_cache(oh);
			_sysc_enable(oh);
		}
	}
	if (!(oh->flags & HWMOD_INIT_NO_IDLE))
		_idle(oh);
	return 0;
}