From 6ca03f0dfb2f65c7834737f9e0befff24064e34a Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 27 Nov 2017 10:25:10 -0200 Subject: 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 --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'board/freescale/mx6sxsabresd') diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 2aeef61ffd..3ad2140314 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -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; } -- cgit v1.2.1