/* Return the actual size of the MC private DRAM block.  */
unsigned long mc_get_dram_block_size(void)
/* Return the actual size of the MC private DRAM block.  */
unsigned long mc_get_dram_block_size(void)
{
	unsigned long dram_block_size = CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE;
	char *dram_block_size_env_var = env_get(MC_MEM_SIZE_ENV_VAR);
	if (dram_block_size_env_var) {
		dram_block_size = simple_strtoul(dram_block_size_env_var, NULL,
						 16);
		if (dram_block_size < CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE) {
			printf("fsl-mc: WARNING: Invalid value for \'"
			       MC_MEM_SIZE_ENV_VAR
			       "\' environment variable: %lu\n",
			       dram_block_size);
			dram_block_size = MC_DRAM_BLOCK_DEFAULT_SIZE;
		}
	}
	return dram_block_size;
}