/* Return the MC boot timeout value in milliseconds  */
static unsigned long get_mc_boot_timeout_ms(void)
/* Return the MC boot timeout value in milliseconds  */
static unsigned long get_mc_boot_timeout_ms(void)
{
	unsigned long timeout_ms = CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS;
	char *timeout_ms_env_var = env_get(MC_BOOT_TIMEOUT_ENV_VAR);
	if (timeout_ms_env_var) {
		timeout_ms = simple_strtoul(timeout_ms_env_var, NULL, 10);
		if (timeout_ms == 0) {
			printf("fsl-mc: WARNING: Invalid value for \'"
			       MC_BOOT_TIMEOUT_ENV_VAR
			       "\' environment variable: %lu\n",
			       timeout_ms);
			timeout_ms = CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS;
		}
	}
	return timeout_ms;
}