configs: ti: Factor out call to 'args_mmc' into MMC common environment
authorAndrew F. Davis <afd@ti.com>
Fri, 10 Jan 2020 19:35:19 +0000 (14:35 -0500)
committerLokesh Vutla <lokeshvutla@ti.com>
Mon, 20 Jan 2020 04:40:28 +0000 (10:10 +0530)
Both 'loadfit' and 'mmcloados' start with a call to 'args_mmc' so this
can be factored out to before eithers only call site. This also allows us
to remove that call from 'loadfit', which should not have been calling it
anyway as that command should not be MMC specific. Without the call to
'args_mmc' the command 'loadfit' becomes just a call to 'run_fit' so
remove the indirection and call 'run_fit' directly, this removes the need
for 'loadfit' command (which was misnamed anyway). Drop it.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
include/configs/ti_armv7_common.h
include/environment/ti/mmc.h

index adc7861539b280fe2d64cd8de987117b36d99dfb..a1a053e67500efc26749855d0496c7ae3fcbf640 100644 (file)
@@ -61,7 +61,6 @@
                "setenv overlaystring ${overlaystring}'#'${overlay};" \
                "done;\0" \
        "run_fit=bootm ${addr_fit}#${fdtfile}${overlaystring}\0" \
-       "loadfit=run args_mmc; run run_fit;\0" \
 
 /*
  * DDR information.  If the CONFIG_NR_DRAM_BANKS is not defined,
index bb4af0a3d54b93a8491ae094afd638eeadf72e5a..1c8e49a8b3da0242673be05bfbe269cc90e8cad3 100644 (file)
@@ -41,7 +41,7 @@
                                "fi;" \
                        "fi;" \
                "fi;\0" \
-       "mmcloados=run args_mmc; " \
+       "mmcloados=" \
                "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
                        "if run loadfdt; then " \
                                "bootz ${loadaddr} - ${fdtaddr}; " \
@@ -61,8 +61,9 @@
                "if mmc rescan; then " \
                        "echo SD/MMC found on device ${mmcdev};" \
                        "if run loadimage; then " \
+                               "run args_mmc; " \
                                "if test ${boot_fit} -eq 1; then " \
-                                       "run loadfit; " \
+                                       "run run_fit; " \
                                "else " \
                                        "run mmcloados;" \
                                "fi;" \