]> git.dujemihanovic.xyz Git - u-boot.git/commit
spl: semihosting: Don't close fd before spl_load_simple_fit
authorSean Anderson <seanga2@gmail.com>
Wed, 8 Nov 2023 16:48:36 +0000 (11:48 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 16 Nov 2023 18:49:13 +0000 (13:49 -0500)
commit517e70856f0fcbb9c84de0414430086bea0008ee
tree36bc7dd2672f8c7c7910a1e9ee8570010bb28eed
parent06b1bca69d355f3f03f3607d03ee308e012ebed2
spl: semihosting: Don't close fd before spl_load_simple_fit

On real hardware, semihosting calls tend to have a large constant
overhead (on the order of tens of milliseconds). Reduce the number of
calls by one by reusing the existing fd in smh_fit_read, and closing it
at the end of spl_smh_load_image.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_semihosting.c