mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
fdt: Drop CONFIG_SPL_BUILD check in fdtdec_setup()
Move this to the header file to clean up the C code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b4b6daf38d
commit
d893b8ad09
@ -111,6 +111,20 @@ struct fdt_pci_addr {
|
|||||||
extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
|
extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
|
||||||
extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
|
extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
|
||||||
|
|
||||||
|
/* Get a pointer to the embedded devicetree, if there is one, else NULL */
|
||||||
|
static inline u8 *dtb_dt_embedded(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_OF_EMBED
|
||||||
|
# ifdef CONFIG_SPL_BUILD
|
||||||
|
return __dtb_dt_spl_begin;
|
||||||
|
# else
|
||||||
|
return __dtb_dt_begin;
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute the size of a resource.
|
* Compute the size of a resource.
|
||||||
*
|
*
|
||||||
|
@ -1629,11 +1629,7 @@ int fdtdec_setup(void)
|
|||||||
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
#if CONFIG_IS_ENABLED(OF_CONTROL)
|
||||||
# ifdef CONFIG_OF_EMBED
|
# ifdef CONFIG_OF_EMBED
|
||||||
/* Get a pointer to the FDT */
|
/* Get a pointer to the FDT */
|
||||||
# ifdef CONFIG_SPL_BUILD
|
gd->fdt_blob = dtb_dt_embedded();
|
||||||
gd->fdt_blob = __dtb_dt_spl_begin;
|
|
||||||
# else
|
|
||||||
gd->fdt_blob = __dtb_dt_begin;
|
|
||||||
# endif
|
|
||||||
# elif defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
|
# elif defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
|
||||||
/* Allow the board to override the fdt address. */
|
/* Allow the board to override the fdt address. */
|
||||||
gd->fdt_blob = board_fdt_blob_setup(&ret);
|
gd->fdt_blob = board_fdt_blob_setup(&ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user