]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ti: omap: am3517evm: Move environment definition to env file
authorAdam Ford <aford173@gmail.com>
Tue, 9 Jul 2024 02:38:57 +0000 (21:38 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 18 Jul 2024 13:40:30 +0000 (07:40 -0600)
Instead of cluttering up a header file with a bunch of defines,
move the default environmental variables to a file called
am3517evm.env and reference it from the defconfig.  Also
remove dead comments.

Signed-off-by: Adam Ford <aford173@gmail.com>
board/logicpd/am3517evm/am3517evm.env [new file with mode: 0644]
configs/am3517_evm_defconfig
include/configs/am3517_evm.h

diff --git a/board/logicpd/am3517evm/am3517evm.env b/board/logicpd/am3517evm/am3517evm.env
new file mode 100644 (file)
index 0000000..77bb31c
--- /dev/null
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+console=ttyS2,115200n8
+fdtfile=am3517-evm.dtb
+fdtaddr=0x82C00000
+vram=16M
+bootenv=uEnv.txt
+mmcdev=0
+mmcpart=1
+mmcroot=/dev/mmcblk0p2 rw
+mmcrootfstype=ext4 rootwait fixrtc
+mmcargs=setenv bootargs console=${console} ${mtdparts} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} ${cmdline}
+nandargs=setenv bootargs console=${console} ${mtdparts} ${optargs} root=ubi0:rootfs rw ubi.mtd=rootfs rootfstype=ubifs rootwait ${cmdline}
+loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}
+importbootenv=echo "Importing environment from mmc ..."; env import -t ${loadaddr} ${filesize}
+bootscript=echo "Running bootscript from mmc ..."; source ${loadaddr}
+loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}
+loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}
+mmcboot=echo "Booting from mmc ..."; run mmcargs; bootz ${loadaddr} - ${fdtaddr}
+nandboot=echo "Booting from nand ..."; run nandargs; nand read ${loadaddr} 2a0000 800000; nand read ${fdtaddr} aa0000 80000; bootm ${loadaddr} - ${fdtaddr}
index 70498ca7fb2a912a3f8196f47f38e494e4280f29..3236f1dd672f851cccd7b8654650206efd8cea9f 100644 (file)
@@ -6,6 +6,7 @@ CONFIG_TEXT_BASE=0x80100000
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_SOURCE_FILE="am3517evm"
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4020ff00
 CONFIG_DEFAULT_DEVICE_TREE="ti/omap/am3517-evm"
index b75c6483883177a4b00bb3d3930f4e30a402b8c3..e3432ebeaabb5cd0985207520e95b612edb3594f 100644 (file)
@@ -15,7 +15,7 @@
 #include <configs/ti_omap3_common.h>
 
 /* Board NAND Info. */
-#ifdef CONFIG_MTD_RAW_NAND
+#if defined(CONFIG_MTD_RAW_NAND)
 #define CFG_SYS_NAND_ECCPOS            { 2,  3,  4,  5,  6,  7,  8,  9, 10, \
                                         11, 12, 13, 14, 16, 17, 18, 19, 20, \
                                         21, 22, 23, 24, 25, 26, 27, 28, 30, \
  *  DTB                  4 * NAND_BLOCK_SIZE = 512 KiB  @ 0xAA0000
  *  RootFS              Remaining Flash Space           @ 0xB20000
  */
-#endif /* CONFIG_MTD_RAW_NAND */
-
-/* Environment information */
-#define CFG_EXTRA_ENV_SETTINGS \
-       "loadaddr=0x82000000\0" \
-       "console=ttyS2,115200n8\0" \
-       "fdtfile=am3517-evm.dtb\0" \
-       "fdtaddr=0x82C00000\0" \
-       "vram=16M\0" \
-       "bootenv=uEnv.txt\0" \
-       "cmdline=\0" \
-       "optargs=\0" \
-       "mmcdev=0\0" \
-       "mmcpart=1\0" \
-       "mmcroot=/dev/mmcblk0p2 rw\0" \
-       "mmcrootfstype=ext4 rootwait fixrtc\0" \
-       "mmcargs=setenv bootargs console=${console} " \
-               "${mtdparts} " \
-               "${optargs} " \
-               "root=${mmcroot} " \
-               "rootfstype=${mmcrootfstype} " \
-               "${cmdline}\0" \
-       "nandargs=setenv bootargs console=${console} " \
-               "${mtdparts} " \
-               "${optargs} " \
-               "root=ubi0:rootfs rw ubi.mtd=rootfs " \
-               "rootfstype=ubifs rootwait " \
-               "${cmdline}\0" \
-       "loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\
-       "importbootenv=echo Importing environment from mmc ...; " \
-               "env import -t ${loadaddr} ${filesize}\0" \
-       "bootscript=echo Running bootscript from mmc ...; " \
-               "source ${loadaddr}\0" \
-       "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \
-       "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
-       "mmcboot=echo Booting from mmc ...; " \
-               "run mmcargs; " \
-               "bootz ${loadaddr} - ${fdtaddr}\0" \
-       "nandboot=echo Booting from nand ...; " \
-               "run nandargs; " \
-               "nand read ${loadaddr} 2a0000 800000; " \
-               "nand read ${fdtaddr} aa0000 80000; " \
-               "bootm ${loadaddr} - ${fdtaddr}\0" \
-
-/* Miscellaneous configurable options */
-
-/* memtest works on */
 
-/* FLASH and environment organization */
-
-/* **** PISMO SUPPORT *** */
-                                               /* on one chip */
-
-#if defined(CONFIG_MTD_RAW_NAND)
 #define CFG_SYS_FLASH_BASE             NAND_BASE
-#endif
+#endif /* CONFIG_MTD_RAW_NAND */
 
 #endif /* __CONFIG_H */