]> git.sur5r.net Git - u-boot/commitdiff
ti_armv7_common: env: Consolidate support for loading images from mmc
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 29 Nov 2016 06:27:59 +0000 (11:57 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 3 Dec 2016 18:21:07 +0000 (13:21 -0500)
Support for loading images from mmc is duplicated in all TI platforms.
Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused
in all TI platforms.

Reviewed-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/configs/am335x_evm.h
include/configs/am43xx_evm.h
include/configs/ti_armv7_common.h
include/configs/ti_omap4_common.h
include/configs/ti_omap5_common.h

index 27d26af6f1c8be2783bac4543c4175c164a5f07f..98827a107b6ee97f24cb3259020722038cea5393 100644 (file)
 #define CONFIG_EXTRA_ENV_SETTINGS \
        DEFAULT_LINUX_BOOT_ENV \
        DEFAULT_MMC_TI_ARGS \
-       "boot_fdt=try\0" \
        "bootpart=0:2\0" \
        "bootdir=/boot\0" \
        "bootfile=zImage\0" \
                "root=${ramroot} " \
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
-       "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
-       "mmcloados=run args_mmc; " \
-               "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
-                       "if run loadfdt; then " \
-                               "bootz ${loadaddr} - ${fdtaddr}; " \
-                       "else " \
-                               "if test ${boot_fdt} = try; then " \
-                                       "bootz; " \
-                               "else " \
-                                       "echo WARN: Cannot load the DT; " \
-                               "fi; " \
-                       "fi; " \
-               "else " \
-                       "bootz; " \
-               "fi;\0" \
-       "mmcboot=mmc dev ${mmcdev}; " \
-               "if mmc rescan; then " \
-                       "echo SD/MMC found on device ${mmcdev};" \
-                       "run envboot; " \
-                       "if run loadimage; then " \
-                               "run mmcloados;" \
-                       "fi;" \
-               "fi;\0" \
        "spiboot=echo Booting from spi ...; " \
                "run spiargs; " \
                "sf probe ${spibusno}:0; " \
index 6416d55c425007e5e3f255039df15eeddac7df56..07d30197f637c5e28747d05053a21f74ba58e5ad 100644 (file)
                "root=${ramroot} " \
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
-       "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-       "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
-       "mmcboot=mmc dev ${mmcdev}; " \
-               "setenv devnum ${mmcdev}; " \
-               "setenv devtype mmc; " \
-               "if mmc rescan; then " \
-                       "echo SD/MMC found on device ${devnum};" \
-                       "if run loadimage; then " \
-                               "run loadfdt; " \
-                               "echo Booting from mmc${mmcdev} ...; " \
-                               "run args_mmc; " \
-                               "bootz ${loadaddr} - ${fdtaddr}; " \
-                       "fi;" \
-               "fi;\0" \
        "usbboot=" \
                "setenv devnum ${usbdev}; " \
                "setenv devtype usb; " \
index 1be8137e33f1f153572cdd49fda2d86bc1418b66..a60a32e3605490e251c56ec6babbf759f40698c5 100644 (file)
@@ -54,7 +54,8 @@
        "ramdisk_addr_r=0x88080000\0" \
        "scriptaddr=0x80000000\0" \
        "pxefile_addr_r=0x80100000\0" \
-       "bootm_size=0x10000000\0"
+       "bootm_size=0x10000000\0" \
+       "boot_fdt=try\0"
 
 #define DEFAULT_MMC_TI_ARGS \
        "mmcdev=0\0" \
@@ -71,6 +72,8 @@
        "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
                "env import -t ${loadaddr} ${filesize}\0" \
        "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
+       "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+       "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        "envboot=mmc dev ${mmcdev}; " \
                "if mmc rescan; then " \
                        "echo SD/MMC found on device ${mmcdev};" \
                                "fi;" \
                        "fi;" \
                "fi;\0" \
+       "mmcloados=run args_mmc; " \
+               "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+                       "if run loadfdt; then " \
+                               "bootz ${loadaddr} - ${fdtaddr}; " \
+                       "else " \
+                               "if test ${boot_fdt} = try; then " \
+                                       "bootz; " \
+                               "else " \
+                                       "echo WARN: Cannot load the DT; " \
+                               "fi; " \
+                       "fi; " \
+               "else " \
+                       "bootz; " \
+               "fi;\0" \
+       "mmcboot=mmc dev ${mmcdev}; " \
+               "setenv devnum ${mmcdev}; " \
+               "setenv devtype mmc; " \
+               "if mmc rescan; then " \
+                       "echo SD/MMC found on device ${mmcdev};" \
+                       "if run loadimage; then " \
+                               "run mmcloados;" \
+                       "fi;" \
+               "fi;\0" \
 
 /*
  * DDR information.  If the CONFIG_NR_DRAM_BANKS is not defined,
index aa17c09ce96841651d62fb1a96b6f3fa8cf2d6c7..ce9d3e88835f4feedecfc473cd30570ff27dc6a2 100644 (file)
        "bootfile=zImage\0" \
        "usbtty=cdc_acm\0" \
        "vram=16M\0" \
-       "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
        "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
-       "mmcboot=echo Booting from mmc${mmcdev} ...; " \
-               "run args_mmc; " \
-               "if run loadimage; then " \
-                       "run loadfdt; " \
-                       "bootz ${loadaddr} - ${fdtaddr}; " \
-               "fi;\0" \
        "uimageboot=echo Booting from mmc${mmcdev} ...; " \
                "run args_mmc; " \
                "bootm ${loadaddr}\0" \
                        "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
-       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
        BOOTENV
 
 /*
index 8322f645fe9667756ea324c007f2124c98aa9f9f..d2f61c804ae5a979d10401a83d49bbaf8f70cb73 100644 (file)
        "partitions=" PARTS_DEFAULT "\0" \
        "optargs=\0" \
        "dofastboot=0\0" \
-       "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
-       "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
-               "source ${loadaddr}\0" \
-       "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-       "mmcboot=mmc dev ${mmcdev}; " \
-               "if mmc rescan; then " \
-                       "echo SD/MMC found on device ${mmcdev};" \
-                       "if run loadimage; then " \
-                               "run loadfdt; " \
-                               "echo Booting from mmc${mmcdev} ...; " \
-                               "run args_mmc; " \
-                               "bootz ${loadaddr} - ${fdtaddr}; " \
-                       "fi;" \
-               "fi;\0" \
        "findfdt="\
                "if test $board_name = omap5_uevm; then " \
                        "setenv fdtfile omap5-uevm.dtb; fi; " \
                        "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
                "if test $fdtfile = undefined; then " \
                        "echo WARNING: Could not determine device tree to use; fi; \0" \
-       "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
        DFUARGS \
        NETARGS \