"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

vbe: Allow VBE to disable adding loadables to the FDT

When VBE operates within VPL it does not want the FDT to be changed.
Provide a way to disable this feature.

Move the FIT_IMAGE_TINY condition out of spl_fit_record_loadable() so
that both conditions are together. This makes the code easier to
understand.

Replace the existing fit_loaded member, which is no-longer used.

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

authored by

Simon Glass and committed by
Tom Rini
f4415f2a 39a9b033

+17 -9
+1
boot/vbe_common.c
··· 208 208 struct spl_load_info info; 209 209 210 210 spl_load_init(&info, h_vbe_load_read, desc, desc->blksz); 211 + xpl_set_fdt_update(&info, false); 211 212 xpl_set_phase(&info, IH_PHASE_U_BOOT); 212 213 log_debug("doing SPL from %s blksz %lx log2blksz %x area_offset %lx + fdt_size %lx\n", 213 214 blk->name, desc->blksz, desc->log2blksz, area_offset, ALIGN(size, 4));
+2 -4
common/spl/spl_fit.c
··· 515 515 const char *name; 516 516 int node; 517 517 518 - if (CONFIG_IS_ENABLED(FIT_IMAGE_TINY)) 519 - return 0; 520 - 521 518 ret = spl_fit_get_image_name(ctx, "loadables", index, &name); 522 519 if (ret < 0) 523 520 return ret; ··· 863 860 spl_image->entry_point = image_info.entry_point; 864 861 865 862 /* Record our loadables into the FDT */ 866 - if (spl_image->fdt_addr) 863 + if (!CONFIG_IS_ENABLED(FIT_IMAGE_TINY) && 864 + xpl_get_fdt_update(info) && spl_image->fdt_addr) 867 865 spl_fit_record_loadable(&ctx, index, 868 866 spl_image->fdt_addr, 869 867 &image_info);
+14 -5
include/spl.h
··· 345 345 * @priv: Private data for the device 346 346 * @bl_len: Block length for reading in bytes 347 347 * @phase: Image phase to load 348 - * @fit_loaded: true if the FIT has been loaded, except for external data 348 + * @no_fdt_update: true to update the FDT with any loadables that are loaded 349 349 */ 350 350 struct spl_load_info { 351 351 spl_load_reader read; ··· 355 355 #endif 356 356 #if CONFIG_IS_ENABLED(BOOTMETH_VBE) 357 357 u8 phase; 358 - u8 fit_loaded; 358 + u8 fdt_update; 359 359 #endif 360 360 }; 361 361 ··· 395 395 #endif 396 396 } 397 397 398 - static inline bool xpl_get_fit_loaded(struct spl_load_info *info) 398 + static inline void xpl_set_fdt_update(struct spl_load_info *info, 399 + bool fdt_update) 400 + { 401 + #if CONFIG_IS_ENABLED(BOOTMETH_VBE) 402 + info->fdt_update = fdt_update; 403 + #endif 404 + } 405 + 406 + static inline enum image_phase_t xpl_get_fdt_update(struct spl_load_info *info) 399 407 { 400 408 #if CONFIG_IS_ENABLED(BOOTMETH_VBE) 401 - return info->fit_loaded; 409 + return info->fdt_update; 402 410 #else 403 - return false; 411 + return true; 404 412 #endif 405 413 } 406 414 ··· 415 423 load->priv = priv; 416 424 spl_set_bl_len(load, bl_len); 417 425 xpl_set_phase(load, IH_PHASE_NONE); 426 + xpl_set_fdt_update(load, true); 418 427 } 419 428 420 429 /*