fit: Refactor config node handling

This patch makes some minor refactoring to the way the FIT parser
handles config nodes. A lot of this code was written in the dawn age of
depthcharge when our device tree library wasn't as well-stocked yet, so
some of it can be rewritten nicer with more high-level primitives.
There's no point in storing both the string name and the actual FDT node
of a FIT image node separately, since the latter also contains the
former, so remove that. Also eliminate code for the case of not having
an FDT (which makes no sense), and move compat ranking into its own
function (the indentation depth got a little too gnarly there).

BRANCH=None
BUG=None
TEST=None

Change-Id: I11d4e0a35de9cd98c6007f6de9f13ae5b830c63d
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1553456
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2 files changed