aboutsummaryrefslogtreecommitdiff
path: root/include/env/ti/mmc.h
diff options
context:
space:
mode:
authorSimon Glass2023-07-30 21:01:45 -0600
committerBin Meng2023-08-09 23:31:12 +0800
commit5e541a05f70296dbad07fc1f4e8678ad207bb476 (patch)
tree78e5cd5c03868910fc8de40e6179b2afdc99ca3c /include/env/ti/mmc.h
parentf26a966b2ed06ab1ba86ebce16b96b73bc3f283f (diff)
env: Use include/env for text-environment includes
The 'environment' word is too long. We mostly use 'env' in U-Boot, so use that as the name of the include directory too. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Intel Edison Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/env/ti/mmc.h')
-rw-r--r--include/env/ti/mmc.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/include/env/ti/mmc.h b/include/env/ti/mmc.h
new file mode 100644
index 00000000000..769ea9d5ef7
--- /dev/null
+++ b/include/env/ti/mmc.h
@@ -0,0 +1,73 @@
+/* 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 ${boot} ${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}; " \
+ "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 */