diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-04-26 00:47:21 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2015-04-27 14:13:58 +0300 |
commit | 205d58699b157df75f1aa0b363ea9c21add21a0c (patch) | |
tree | 262676d1ef895f3080eba13fe80e77a8bedaa5d9 /board | |
parent | 6a305f22c58b5cef595b2e004fc6b299934dd82a (diff) | |
download | u-boot-205d58699b157df75f1aa0b363ea9c21add21a0c.tar.xz |
mx6cuboxi: Load the correct 'fdtfile' variable
Instead of hardcoding the 'fdtfile' variable, let's detect the SoC and
board variant on the fly and change the dtb name.
Based on the scheme done on am335x board.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/solidrun/mx6cuboxi/mx6cuboxi.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index 9123255889..d3a32c1663 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -212,6 +212,31 @@ int checkboard(void) return 0; } +static bool is_mx6q(void) +{ + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + return true; + else + return false; +} + +int board_late_init(void) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + if (is_hummingboard()) + setenv("board_name", "HUMMINGBOARD"); + else + setenv("board_name", "CUBOXI"); + + if (is_mx6q()) + setenv("board_rev", "MX6Q"); + else + setenv("board_rev", "MX6DL"); +#endif + + return 0; +} + #ifdef CONFIG_SPL_BUILD #include <asm/arch/mx6-ddr.h> static const struct mx6dq_iomux_ddr_regs mx6q_ddr_ioregs = { |