]> git.dujemihanovic.xyz Git - u-boot.git/commit
spl: fit: Only look up FIT configuration node once
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Wed, 20 Jan 2021 16:46:53 +0000 (10:46 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 18 Feb 2021 00:46:43 +0000 (19:46 -0500)
commit9e9aa0b473a3217796e7d76a51004af2f42161fd
tree2e3eb4e50e4395c2d4e21510baaed88f9584b805
parente4928270a4ab758ecfe54c9b296a00470fdee335
spl: fit: Only look up FIT configuration node once

The configuration node a sub node under "/configurations", which
describes the components to load from "/images". We only need to
locate this node once.

However, for each component, spl_fit_get_image_name() would parse the
FIT image, looking for the correct node. Such work duplication is not
necessary. Instead, once the node is found, cache it, and re-use it.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c