mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
spl: Allow spl_load() to be controlled in any xPL phase
Some phases may wish to use full FIT-loading and others not, so allow this to be controlled. Add some debugging while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5fb647c83e
commit
fe71ebbea9
1 changed files with 7 additions and 2 deletions
|
@ -20,13 +20,15 @@ static inline int _spl_load(struct spl_image_info *spl_image,
|
||||||
ulong base_offset, image_offset, overhead;
|
ulong base_offset, image_offset, overhead;
|
||||||
int read, ret;
|
int read, ret;
|
||||||
|
|
||||||
|
log_debug("\nloading hdr from %lx to %p\n", (ulong)offset, header);
|
||||||
read = info->read(info, offset, ALIGN(sizeof(*header),
|
read = info->read(info, offset, ALIGN(sizeof(*header),
|
||||||
spl_get_bl_len(info)), header);
|
spl_get_bl_len(info)), header);
|
||||||
if (read < (int)sizeof(*header))
|
if (read < (int)sizeof(*header))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
if (image_get_magic(header) == FDT_MAGIC) {
|
if (image_get_magic(header) == FDT_MAGIC) {
|
||||||
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL)) {
|
log_debug("Found FIT\n");
|
||||||
|
if (CONFIG_IS_ENABLED(LOAD_FIT_FULL)) {
|
||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -48,10 +50,13 @@ static inline int _spl_load(struct spl_image_info *spl_image,
|
||||||
return spl_parse_image_header(spl_image, bootdev, buf);
|
return spl_parse_image_header(spl_image, bootdev, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT))
|
if (CONFIG_IS_ENABLED(LOAD_FIT)) {
|
||||||
|
log_debug("Simple loading\n");
|
||||||
return spl_load_simple_fit(spl_image, info, offset,
|
return spl_load_simple_fit(spl_image, info, offset,
|
||||||
header);
|
header);
|
||||||
}
|
}
|
||||||
|
log_debug("No FIT support\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER) &&
|
if (IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER) &&
|
||||||
valid_container_hdr((void *)header))
|
valid_container_hdr((void *)header))
|
||||||
|
|
Loading…
Add table
Reference in a new issue