]> git.dujemihanovic.xyz Git - u-boot.git/commit
spl: Drop the switch() statement for OS selection
authorSimon Glass <sjg@chromium.org>
Tue, 26 Sep 2023 14:14:22 +0000 (08:14 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2023 18:38:12 +0000 (14:38 -0400)
commitf817e08ff290c51f6471345d7bc11507cde8ffbc
treeabefe7ce3ce8ce362a6b5761107766e1043a1492
parente0be6eaf581d06af788509e588129c4dbae967d2
spl: Drop the switch() statement for OS selection

This code is pretty ugly, with many #ifdefs

There are quite a lot of IH_OS_U_BOOT values so the compiler struggles
to create a jump table here. Also, most of the options are normally
disabled.

Change it to an else...if construct instead. Add an accessor for the
spl_image field behind an #ifdef to avoid needing #ifdef in the C code.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl.c
include/spl.h