mx6sxsabresd: Load the correct dtb for revA board

Currently only imx6sx-sdb.dtb is loaded, but if revA board is used the
correct dtb is imx6sx-sdb-reva.dtb, so make this possible.

While at it, remove an extra 'mmc dev'.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
This commit is contained in:
Fabio Estevam
2017-11-27 10:25:10 -02:00
committed by Stefano Babic
parent 4555c26142
commit 6ca03f0dfb
5 changed files with 24 additions and 3 deletions

View File

@@ -540,9 +540,23 @@ int board_init(void)
return 0;
}
static bool is_reva(void)
{
return (nxp_board_rev() == 1);
}
int board_late_init(void)
{
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
if (is_reva())
env_set("board_rev", "REVA");
#endif
return 0;
}
int checkboard(void)
{
puts("Board: MX6SX SABRE SDB\n");
printf("Board: MX6SX SABRE SDB rev%c\n", nxp_board_rev_string());
return 0;
}