summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/tbs/tbs2910/tbs2910.c11
-rw-r--r--include/configs/tbs2910.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index 0b509b6..d302fc2 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -257,6 +257,17 @@ int board_mmc_init(bd_t *bis)
}
return 0;
}
+
+/* set environment device to boot device when booting from SD */
+int board_mmc_get_env_dev(int devno)
+{
+ return devno - 1;
+}
+
+int board_mmc_get_env_part(int devno)
+{
+ return (devno == 3) ? 1 : 0; /* part 0 for SD2 / SD3, part 1 for eMMC */
+}
#endif /* CONFIG_FSL_ESDHC */
#ifdef CONFIG_VIDEO_IPUV3
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 17b0213..0f23034 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -176,8 +176,8 @@
/* Environment organization */
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 2
-#define CONFIG_SYS_MMC_ENV_PART 1
+#define CONFIG_SYS_MMC_ENV_DEV 2 /* overwritten on SD boot */
+#define CONFIG_SYS_MMC_ENV_PART 1 /* overwritten on SD boot */
#define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_OFFSET (384 * 1024)
#define CONFIG_ENV_OVERWRITE