]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
environment: ti: Make get_fdt_mmc common
authorAndrew Davis <afd@ti.com>
Fri, 14 Jul 2023 05:52:31 +0000 (11:22 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 22 Jul 2023 00:35:50 +0000 (20:35 -0400)
Since get_fdt_mmc is common, factor it out into mmc.env and remove
it from each platform env file along with changing the directory path to
reflect the standards. Use it in mmcloados but keep loadfdt
defined in case it is still used by some external uEnv.txt script.

Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
board/ti/am62ax/am62ax.env
board/ti/am62x/am62x.env
board/ti/am64x/am64x.env
board/ti/am65x/am65x.env
board/ti/j721e/j721e.env
board/ti/j721s2/j721s2.env
include/environment/ti/mmc.env

index 95401756e20a6e045d4b07739f977866685ad67b..491ec973bbc6a53f6a9b5368054bd378d0ad612e 100644 (file)
@@ -17,7 +17,6 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 37af691991677ffa34f2b61e6f9df20a7881837b..0901a8536da5c41643882aa2205fec6803d191f7 100644 (file)
@@ -17,7 +17,6 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 4d27f16e8ca977a7aae3b0a557d3bfafb3323d4e..015f63a66c71b3beaabd649fceed85bc0ab178e3 100644 (file)
@@ -21,7 +21,6 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 3c583b77fd1e17527fa8251d4901be95b33d3748..d7130cc3f7df642e603aa949599475c370f8fb88 100644 (file)
@@ -20,7 +20,6 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 12b5610b3e47114c955edc6f18d0a205f47052a4..23ce7e1af7462eae8ea06d82b732c37a44107e91 100644 (file)
@@ -37,7 +37,6 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 67953d3f5984fe25c27724505a159d169ad90752..9464fe49903772add1fbf85dac1a9bc1dd6ebb6a 100644 (file)
@@ -31,7 +31,6 @@ name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw
 #endif
 rd_spec=-
 init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
 get_overlay_mmc=
        fdt address ${fdtaddr};
        fdt resize 0x100000;
index 5677d057d864ce167d62221c18117fc1ed8e1506..a052d288535e3e2c4385e34ec096f92072c3a720 100644 (file)
@@ -13,7 +13,8 @@ importbootenv=echo Importing environment from mmc${mmcdev} ...;
        env import -t ${loadaddr} ${filesize}
 loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
 loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
-loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
+loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
+get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
 envboot=mmc dev ${mmcdev};
        if mmc rescan; then
                echo SD/MMC found on device ${mmcdev};
@@ -32,7 +33,7 @@ envboot=mmc dev ${mmcdev};
        fi;
 mmcloados=
        if test ${boot_fdt} = yes || test ${boot_fdt} = try; then
-               if run loadfdt; then
+               if run get_fdt_mmc; then
                        bootz ${loadaddr} - ${fdtaddr};
                else
                        if test ${boot_fdt} = try; then