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>
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
fi;
fi;
fi;
+ fi;
mmcloados=
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then
if run get_fdt_mmc; then
else
bootz;
fi;
-mmcboot=mmc dev ${mmcdev};
+mmcboot=if mmc dev ${mmcdev}; then
devnum=${mmcdev};
devtype=mmc;
if mmc rescan; then
run mmcloados;
fi;
fi;
-fi;
+ fi;
+ fi;
init_mmc=run args_all args_mmc
get_overlay_mmc=