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>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 2aeef61..3ad2140 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -540,9 +540,23 @@
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;
}