summaryrefslogtreecommitdiff
path: root/board/freescale/mx6sabresd
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-07-11 11:38:46 +0800
committerStefano Babic <sbabic@denx.de>2015-08-02 10:47:05 +0200
commite6fc8995d6654df23387ccac91543a2206cfcb36 (patch)
tree83fa7c953bd27c07b642be6926fcf26a9211a598 /board/freescale/mx6sabresd
parent8d7794615c7672b03b5140dfe2bac65daf7ce5eb (diff)
downloadu-boot-imx-e6fc8995d6654df23387ccac91543a2206cfcb36.zip
u-boot-imx-e6fc8995d6654df23387ccac91543a2206cfcb36.tar.gz
u-boot-imx-e6fc8995d6654df23387ccac91543a2206cfcb36.tar.bz2
imx: mx6sabresd/sabreauto runtime setting fdt_file
Detect the SOC and board variant at runtime and change the dtb name, but not hardcoding the fdt_file env variable. Take the following patch as a reference. Íd58699b157df75f1aa0b363ea9c21add21a0c "mx6cuboxi: Load the correct 'fdtfile' variable" Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/freescale/mx6sabresd')
-rw-r--r--board/freescale/mx6sabresd/mx6sabresd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index fa800f4..eb8a8b3 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -680,6 +680,16 @@ int board_late_init(void)
#ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);
#endif
+
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+ setenv("board_name", "SABRESD");
+
+ if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
+ setenv("board_rev", "MX6Q");
+ else if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO))
+ setenv("board_rev", "MX6DL");
+#endif
+
return 0;
}