/* Initialize Cache Module. 
This function does low level cache configuration. */
int32_t _cmcc_init(void)
/* Initialize Cache Module. 
This function does low level cache configuration. */
int32_t _cmcc_init(void)
{
	int32_t return_value;
	_cmcc_disable(CMCC);
	if (_is_cache_disabled(CMCC)) {
		hri_cmcc_write_CFG_reg(
		    CMCC,
		    (CMCC_CFG_CSIZESW(CONF_CMCC_CACHE_SIZE) | (CONF_CMCC_DATA_CACHE_DISABLE << CMCC_CFG_DCDIS_Pos)
		     | (CONF_CMCC_INST_CACHE_DISABLE << CMCC_CFG_ICDIS_Pos) | (CONF_CMCC_CLK_GATING_DISABLE)));
		_cmcc_enable(CMCC);
		return_value = _is_cache_enabled(CMCC) == true ? ERR_NONE : ERR_FAILURE;
	} else {
		return_value = ERR_NOT_INITIALIZED;
	}
	return return_value;
}