[PATCH v2 09/12] bloblist: Refactor Kconfig to support alloc or fixed

Simon Glass sjg at chromium.org
Thu Jan 13 19:00:43 CET 2022


At present we do support allocating the bloblist but the Kconfig is a bit
strange, since we still have to specify an address in that case. Partly
this is because it is a pain to have CONFIG options that disappears when
its dependency is enabled. It means that we must have #ifdefs in the code,
either in the C code or header file.

Make use of IF_ENABLED_INT() and its friend to solve that problem, so we
can separate out the location of bloblist into a choice. Put the address
and size into variables so we can log the result.

Add the options for SPL as well, so we can use CONFIG_IS_ENABLED().

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Create an accessor for CONFIG_BLOBLIST_ADDR instead of the Kconfig macro

 common/Kconfig     | 91 +++++++++++++++++++++++++++++++++++++++++-----
 common/bloblist.c  | 39 ++++++++++++--------
 include/bloblist.h | 10 +++++
 3 files changed, 116 insertions(+), 24 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list