Commit 33348a383808d28c9d1072819e9513be61bb9cbc

Authored by Jean-Jacques Hiblot
Committed by Lokesh Vutla
1 parent 76a471c348

ARM: ti: Update layout for MMC and eMMC (env and dfu)

commit 7a53a1a8115b upstream

The problems with the current DFU layout are:
MMC: The space allocated for u-boot is too small for the latest u-boot
     (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
eMMC: region "u-boot.img.raw" overlaps the environment area and the region
      "spl-os-image.raw".
both: region "spl-os-image.raw" is quite small and can't handle android
      kernels

Fixing this requires growing some regions and moving others.
Care has been taken to leave some room for further growth of
"spl-os-args.raw".
Also the "env" now appears in the dfu so that it's apparent that the
region is not free space that can be used to grow "u-boot.img.raw".
The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
MLO comes too overflow this areas.
The total space allocated for those raw binaries is 16MB, of which 13+MB
are reserved for the kernel image.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

Showing 4 changed files with 13 additions and 10 deletions Side-by-side Diff

include/configs/dra7xx_evm.h
... ... @@ -28,7 +28,7 @@
28 28 #define CONFIG_ENV_IS_IN_MMC
29 29 #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
30 30 #define CONFIG_ENV_SIZE (128 << 10)
31   -#define CONFIG_ENV_OFFSET 0xE0000
  31 +#define CONFIG_ENV_OFFSET 0x260000
32 32 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
33 33 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
34 34 #endif
include/configs/omap5_uevm.h
... ... @@ -38,7 +38,7 @@
38 38 #define CONFIG_ENV_IS_IN_MMC
39 39 #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
40 40 #define CONFIG_ENV_SIZE (128 << 10)
41   -#define CONFIG_ENV_OFFSET 0xE0000
  41 +#define CONFIG_ENV_OFFSET 0x260000
42 42 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
43 43 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
44 44  
include/configs/ti_armv7_common.h
... ... @@ -220,9 +220,10 @@
220 220 #define CONFIG_SPL_FS_LOAD_ARGS_NAME "args"
221 221  
222 222 /* RAW SD card / eMMC */
223   -#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x900 /* address 0x120000 */
224   -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x80 /* address 0x10000 */
225   -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80 /* 64KiB */
  223 +#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1700 /* address 0x2E0000 */
  224 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x1500 /* address 0x2A0000 */
  225 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x200 /* 256KiB */
  226 +
226 227  
227 228 /* spl export command */
228 229 #define CONFIG_CMD_SPL
include/environment/ti/dfu.h
... ... @@ -12,9 +12,10 @@
12 12 "rootfs part 0 2;" \
13 13 "MLO fat 0 1;" \
14 14 "MLO.raw raw 0x100 0x100;" \
15   - "u-boot.img.raw raw 0x300 0x400;" \
16   - "spl-os-args.raw raw 0x80 0x80;" \
17   - "spl-os-image.raw raw 0x900 0x2000;" \
  15 + "u-boot.img.raw raw 0x300 0x1000;" \
  16 + "u-env.raw raw 0x1300 0x200;" \
  17 + "spl-os-args.raw raw 0x1500 0x200;" \
  18 + "spl-os-image.raw raw 0x1700 0x6900;" \
18 19 "spl-os-args fat 0 1;" \
19 20 "spl-os-image fat 0 1;" \
20 21 "u-boot.img fat 0 1;" \
... ... @@ -28,8 +29,9 @@
28 29 "MLO fat 1 1;" \
29 30 "MLO.raw raw 0x100 0x100;" \
30 31 "u-boot.img.raw raw 0x300 0x1000;" \
31   - "spl-os-args.raw raw 0x80 0x80;" \
32   - "spl-os-image.raw raw 0x900 0x2000;" \
  32 + "u-env.raw raw 0x1300 0x200;" \
  33 + "spl-os-args.raw raw 0x1500 0x200;" \
  34 + "spl-os-image.raw raw 0x1700 0x6900;" \
33 35 "spl-os-args fat 1 1;" \
34 36 "spl-os-image fat 1 1;" \
35 37 "u-boot.img fat 1 1;" \