Commit 573668a24e3e4ed5667332ea656e35021767ea6d
Committed by
Tom Warren
1 parent
300feff324
Exists in
master
and in
54 other branches
tegra: put eMMC environment into the boot sectors
When I set up Tegra's config files to put the environment into eMMC, I assumed that CONFIG_ENV_OFFSET was a linearized address relative to the start of the eMMC device, and spanning HW partitions boot0, boot1, general* and the user area in order. However, it turns out that the offset is actually relative to the beginning of the user area. Hence, the environment block ended up in a different location to expected and documented. Set CONFIG_SYS_MMC_ENV_PART=2 (boot1) to solve this, and adjust CONFIG_ENV_OFFSET to be relative to the start of boot1, not the entire eMMC. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Showing 4 changed files with 8 additions and 4 deletions Side-by-side Diff
include/configs/paz00.h
... | ... | @@ -51,8 +51,9 @@ |
51 | 51 | |
52 | 52 | /* Environment in eMMC, at the end of 2nd "boot sector" */ |
53 | 53 | #define CONFIG_ENV_IS_IN_MMC |
54 | -#define CONFIG_ENV_OFFSET ((2 * 1024 * 1024) - CONFIG_ENV_SIZE) | |
54 | +#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE) | |
55 | 55 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
56 | +#define CONFIG_SYS_MMC_ENV_PART 2 | |
56 | 57 | |
57 | 58 | /* USB Host support */ |
58 | 59 | #define CONFIG_USB_EHCI |
include/configs/seaboard.h
... | ... | @@ -77,8 +77,9 @@ |
77 | 77 | |
78 | 78 | /* Environment in eMMC, at the end of 2nd "boot sector" */ |
79 | 79 | #define CONFIG_ENV_IS_IN_MMC |
80 | -#define CONFIG_ENV_OFFSET ((2 * 512 * 1024) - CONFIG_ENV_SIZE) | |
80 | +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE) | |
81 | 81 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
82 | +#define CONFIG_SYS_MMC_ENV_PART 2 | |
82 | 83 | |
83 | 84 | /* USB Host support */ |
84 | 85 | #define CONFIG_USB_EHCI |
include/configs/ventana.h
... | ... | @@ -58,8 +58,9 @@ |
58 | 58 | |
59 | 59 | /* Environment in eMMC, at the end of 2nd "boot sector" */ |
60 | 60 | #define CONFIG_ENV_IS_IN_MMC |
61 | -#define CONFIG_ENV_OFFSET ((2 * 1024 * 1024) - CONFIG_ENV_SIZE) | |
61 | +#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE) | |
62 | 62 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
63 | +#define CONFIG_SYS_MMC_ENV_PART 2 | |
63 | 64 | |
64 | 65 | /* USB Host support */ |
65 | 66 | #define CONFIG_USB_EHCI |
include/configs/whistler.h
... | ... | @@ -72,8 +72,9 @@ |
72 | 72 | * particular card is standard practice as far as I know. |
73 | 73 | */ |
74 | 74 | #define CONFIG_ENV_IS_IN_MMC |
75 | -#define CONFIG_ENV_OFFSET ((2 * 512 * 1024) - CONFIG_ENV_SIZE) | |
75 | +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE) | |
76 | 76 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
77 | +#define CONFIG_SYS_MMC_ENV_PART 2 | |
77 | 78 | |
78 | 79 | /* USB Host support */ |
79 | 80 | #define CONFIG_USB_EHCI |