]> git.baikalelectronics.ru Git - uboot.git/commit
spl: Make image loader infrastructure more universal
authorAndreas Dannenberg <dannenberg@ti.com>
Tue, 4 Jun 2019 22:55:46 +0000 (17:55 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 17 Jul 2019 15:12:54 +0000 (11:12 -0400)
commitae7c2559b5ccd314d979e8d9d8d8f1e2f688f26e
treeaf890038e2619a8827e477fb2ba84fb511d331f7
parent4bb90bb558f43e785c910fbe7a9e1c595f67aa7c
spl: Make image loader infrastructure more universal

The current U-Boot SPL image loader infrastructure is very powerful,
able to initialize and load from a variety of boot media however it
is strongly geared towards loading specific types of images in a very
specific way. To address the need being able to use this infrastructure
to load arbitrary image files go ahead and refactor it as follows:

- Refactor existing spl_mmc_load_image function into superset function,
  accepting additional arguments such as filenames and media load offset
  (same concept can also be applied toother spl_XXX_load_image functions)
- Extend the loader function to "remember" their peripheral initialization
  status so that the init is only done once during the boot process,
- Extend the FIT image loading function to allow skipping the parsing/
  processing of the FIT contents (so that this can be done separately
  in a more customized fashion)
- Populate the SPL_LOAD_IMAGE_METHOD() list with a trampoline function,
  invoking the newly refactored superset functions in a way to maintain
  compatibility with the existing behavior

This refactoring initially covers MMC/SD card loading (RAW and FS-based).

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
common/spl/spl_fit.c
common/spl/spl_mmc.c
include/spl.h