mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-13 14:53:06 +00:00
e77777b2ff
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>
73 lines
2.1 KiB
C
73 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com
|
|
*
|
|
* Environment variable definitions for MMC/SD on TI boards.
|
|
*/
|
|
|
|
#ifndef __TI_MMC_H
|
|
#define __TI_MMC_H
|
|
|
|
#define DEFAULT_MMC_TI_ARGS \
|
|
"mmcdev=0\0" \
|
|
"mmcrootfstype=ext4 rootwait\0" \
|
|
"finduuid=part uuid mmc ${bootpart} uuid\0" \
|
|
"args_mmc=run finduuid;setenv bootargs console=${console} " \
|
|
"${optargs} " \
|
|
"root=PARTUUID=${uuid} rw " \
|
|
"rootfstype=${mmcrootfstype}\0" \
|
|
"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
|
|
"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
|
|
"source ${loadaddr}\0" \
|
|
"bootenvfile=uEnv.txt\0" \
|
|
"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};" \
|
|
"if run loadbootscript; then " \
|
|
"run bootscript;" \
|
|
"else " \
|
|
"if run loadbootenv; then " \
|
|
"echo Loaded env from ${bootenvfile};" \
|
|
"run importbootenv;" \
|
|
"fi;" \
|
|
"if test -n $uenvcmd; then " \
|
|
"echo Running uenvcmd ...;" \
|
|
"run uenvcmd;" \
|
|
"fi;" \
|
|
"fi;" \
|
|
"fi;\0" \
|
|
"mmcloados=" \
|
|
"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}; " \
|
|
"devnum=${mmcdev}; " \
|
|
"setenv devtype mmc; " \
|
|
"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 run_fit; " \
|
|
"else " \
|
|
"run mmcloados;" \
|
|
"fi;" \
|
|
"fi;" \
|
|
"fi;\0"
|
|
|
|
#endif /* __TI_MMC_H */
|