gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
+/* Copy environment to RAM for using with env_get_f()
+ * This is for restricted capabilities before import
+ */
+ void *data = malloc(CONFIG_ENV_SIZE);
+ if (data) {
+ memcpy(data, (void *)CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
+ gd->env_addr = (unsigned long)data;
+ }
/* switch boot controller into SPI mode */
val = readl((void __iomem *)BAIKAL_BOOT_BASE);
val |= 0x100;
return binflags;
}
-static int first_call = 0;
+static int first_call = 1;
static const char *flags_list;
/*