diff options
author | Nishanth Menon <nm@ti.com> | 2023-08-25 13:02:46 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-09-08 10:07:11 -0400 |
commit | 6e869e104a489cb399042233cdce325d9773eacc (patch) | |
tree | 102d63fdc6d722c3c18d59e21eb498875f7ed59e /include/env | |
parent | 63cbfd38a814d72f3e74773c1f8150de788ed4f4 (diff) | |
download | u-boot-6e869e104a489cb399042233cdce325d9773eacc.tar.gz |
include: env: ti: mmc: envboot/mmcboot: Check result of mmc dev before proceeding
If mmc dev reports that the device is not present, there is no point in
proceeding further to attempt to load the files.
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'include/env')
-rw-r--r-- | include/env/ti/mmc.env | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env index 6fb47fb2667..b8eb51ca174 100644 --- a/include/env/ti/mmc.env +++ b/include/env/ti/mmc.env @@ -15,7 +15,7 @@ loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} -envboot=mmc dev ${mmcdev}; +envboot=if mmc dev ${mmcdev}; then if mmc rescan; then echo SD/MMC found on device ${mmcdev}; if run loadbootscript; then @@ -31,6 +31,7 @@ envboot=mmc dev ${mmcdev}; fi; fi; fi; + fi; mmcloados= if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run get_fdt_mmc; then @@ -45,7 +46,7 @@ mmcloados= else bootz; fi; -mmcboot=mmc dev ${mmcdev}; +mmcboot=if mmc dev ${mmcdev}; then devnum=${mmcdev}; devtype=mmc; if mmc rescan; then @@ -58,7 +59,8 @@ mmcboot=mmc dev ${mmcdev}; run mmcloados; fi; fi; -fi; + fi; + fi; init_mmc=run args_all args_mmc get_overlay_mmc= |