ARM: DRA7xx: Update the board_name env variable
authorLokesh Vutla <lokeshvutla@ti.com>
Mon, 14 Jul 2014 14:27:58 +0000 (19:57 +0530)
committerTom Rini <trini@ti.com>
Mon, 14 Jul 2014 15:16:38 +0000 (11:16 -0400)
Update the board_name env variable and accordingly
populate the dtb file.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
board/ti/dra7xx/evm.c
include/configs/ti_omap5_common.h

index 073d15127cf8d94189afdc4f1a715399e188e3bf..7f19655cfeb6041377bbe4ab48547603307611b3 100644 (file)
@@ -82,6 +82,12 @@ int board_init(void)
 
 int board_late_init(void)
 {
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+       if (omap_revision() == DRA722_ES1_0)
+               setenv("board_name", "dra72x");
+       else
+               setenv("board_name", "dra7xx");
+#endif
        init_sata(0);
        return 0;
 }
index a582fa4041274fa4c3e51dae68f9ac64e9209447..cb928ab8e660c9fb9e600147b23201ee0bd3ed7b 100644 (file)
@@ -67,6 +67,7 @@
 #define PARTS_DEFAULT
 #endif
 
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
        DEFAULT_LINUX_BOOT_ENV \
        "console=" CONSOLEDEV ",115200n8\0" \
                        "setenv fdtfile omap5-uevm.dtb; fi; " \
                "if test $board_name = dra7xx; then " \
                        "setenv fdtfile dra7-evm.dtb; fi;" \
+               "if test $board_name = dra72x; then " \
+                       "setenv fdtfile dra72-evm.dtb; fi;" \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \