]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
board/ls2085a: Update env_addr after NOR flash relocation
authorPrabhakar Kushwaha <prabhakar@freescale.com>
Mon, 14 Jul 2014 11:45:44 +0000 (17:15 +0530)
committerYork Sun <yorksun@freescale.com>
Wed, 24 Sep 2014 19:33:18 +0000 (12:33 -0700)
LS2085a has 2 regions in system memory map. Region1 is default map from
where system boots. Once u-boot is moved to DDR, IFC is re-mapped to
Region2.

So, update gd->env_addr to reflect correct address.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/ls2085a/ls2085a.c

index a18db1d71493df35b8c2c05055cdf073a3cc00e7..d19f692e07aa1c186b006a1b05f787f8f0d138ff 100644 (file)
 #include <fdt_support.h>
 #include <libfdt.h>
 #include <fsl_mc.h>
+#include <environment.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
        init_final_memctl_regs();
+
+#ifdef CONFIG_ENV_IS_NOWHERE
+       gd->env_addr = (ulong)&default_environment[0];
+#endif
+
        return 0;
 }