config TARGET_MX6SXSABRESD
bool "mx6sxsabresd"
+ select BOARD_LATE_INIT
select MX6SX
select SUPPORT_SPL
select DM
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;
}
CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6SXSABRESD=y
# CONFIG_CMD_BMODE is not set
+CONFIG_NXP_BOARD_REVISION=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg"
# CONFIG_CONSOLE_MUX is not set
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_WATCHDOG_SUPPORT=y
# CONFIG_CMD_BMODE is not set
+CONFIG_NXP_BOARD_REVISION=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
# CONFIG_CONSOLE_MUX is not set
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
#define UPDATE_M4_ENV ""
#endif
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
#define CONFIG_EXTRA_ENV_SETTINGS \
UPDATE_M4_ENV \
"script=boot.scr\0" \
"fi; " \
"else " \
"bootz; " \
- "fi;\0"
+ "fi;\0" \
+ "findfdt="\
+ "if test test $board_rev = REVA ; then " \
+ "setenv fdt_file imx6sx-sdb-reva.dtb; fi; " \
#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev};" \
+ "run findfdt; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \