]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: ti: boot: Get rid of magic numbers
authorSam Protsenko <semen.protsenko@linaro.org>
Mon, 26 Feb 2018 21:18:01 +0000 (23:18 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 14 Mar 2018 01:59:27 +0000 (21:59 -0400)
Get the start address and the size of partitions using partition names
rather than partition numbers. This way we can change the partition
table further without changing the boot code.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
include/environment/ti/boot.h

index 0a2342061cf3a4e7ebaf1b42238f79a28200e757..24b7783f88947db07480d814c798e51197c07ce2 100644 (file)
                "setenv eval_bootargs setenv bootargs $bootargs; " \
                "run eval_bootargs; " \
                "setenv mmcdev 1; " \
-               "setenv fdt_part 3; " \
-               "setenv boot_part 9; " \
                "setenv machid fe6; " \
                "mmc dev $mmcdev; " \
                "mmc rescan; " \
-               "part start mmc ${mmcdev} ${fdt_part} fdt_start; " \
-               "part size mmc ${mmcdev} ${fdt_part} fdt_size; " \
-               "part start mmc ${mmcdev} ${boot_part} boot_start; " \
-               "part size mmc ${mmcdev} ${boot_part} boot_size; " \
+               "part start mmc ${mmcdev} environment fdt_start; " \
+               "part size mmc ${mmcdev} environment fdt_size; " \
+               "part start mmc ${mmcdev} boot boot_start; " \
+               "part size mmc ${mmcdev} boot boot_size; " \
                "mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \
                "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
                "bootm $loadaddr $loadaddr $fdtaddr;\0"