Skip to content
Snippets Groups Projects
Commit a6684360 authored by Soeren Moch's avatar Soeren Moch Committed by Stefano Babic
Browse files

board: tbs2910: Autoselect environment device when booting from SD


Implement board specific functions to select the environment device and
partition when booting from SD/MMC.

SD2:  mmc 0 0
SD3:  mmc 1 0
eMMC: mmc 2 1

Signed-off-by: default avatarSoeren Moch <smoch@web.de>
parent 1a43dc11
No related branches found
No related tags found
Loading
...@@ -257,6 +257,17 @@ int board_mmc_init(bd_t *bis) ...@@ -257,6 +257,17 @@ int board_mmc_init(bd_t *bis)
} }
return 0; 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 */ #endif /* CONFIG_FSL_ESDHC */
#ifdef CONFIG_VIDEO_IPUV3 #ifdef CONFIG_VIDEO_IPUV3
......
...@@ -176,8 +176,8 @@ ...@@ -176,8 +176,8 @@
/* Environment organization */ /* Environment organization */
#define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 2 #define CONFIG_SYS_MMC_ENV_DEV 2 /* overwritten on SD boot */
#define CONFIG_SYS_MMC_ENV_PART 1 #define CONFIG_SYS_MMC_ENV_PART 1 /* overwritten on SD boot */
#define CONFIG_ENV_SIZE (8 * 1024) #define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_OFFSET (384 * 1024) #define CONFIG_ENV_OFFSET (384 * 1024)
#define CONFIG_ENV_OVERWRITE #define CONFIG_ENV_OVERWRITE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment