diff options
| author | Evgeny Bachinin <[email protected]> | 2024-12-11 01:39:57 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-12-31 10:57:50 -0600 |
| commit | 623f5cf517ae0e0f6f7132ac6411ea0a8dd9b3f7 (patch) | |
| tree | d1cb9297235095524001153a9cb2b69ba43b401f /include | |
| parent | b841e559cd26ffcb20f22e8ee75debed9616c002 (diff) | |
fdtdec: encapsulate dtb_dt_embedded() within
Patch keeps the access to dtb_dt_embedded() within fdtdec API,
by means of new API function introduction. This new function is a
common place for updating appropriate global_data fields for
OF_EMBED case.
Also, the consequence of the patch is movement of '___dtb_dt_*begin'
symbols' declaration from header file, because nobody used symbols
outside the lib/fdtdec.c.
Signed-off-by: Evgeny Bachinin <[email protected]>
Suggested-by: Simon Glass <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/fdtdec.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index 555c9520379..88eeb512978 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -136,23 +136,6 @@ struct fdt_pci_addr { u32 phys_lo; }; -extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ -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_XPL_BUILD - return __dtb_dt_spl_begin; -# else - return __dtb_dt_begin; -# endif -#else - return NULL; -#endif -} - /** * Compute the size of a resource. * @@ -1156,6 +1139,13 @@ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name, unsigned int count, unsigned long flags); /** + * fdtdec_setup_embed - pick up embedded DTS + * + * Should be invoked under CONFIG_OF_EMBED guard. + */ +void fdtdec_setup_embed(void); + +/** * Set up the device tree ready for use */ int fdtdec_setup(void); |
