diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-16 17:25:06 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-22 20:39:26 -0700 |
commit | ec1add1e51affd4aacc308dc37439ea13dc1b70e (patch) | |
tree | 6b9283b58c8684a239d25492c2e8a8b1319be8ca /drivers/core/ofnode.c | |
parent | 73da3d2cffc601b2761c4aa32492b88f87c363c5 (diff) |
dm: core: Inline a few ofnode functions in SPL
A recent change to unify the flattree/livetree code introduced a small
size increase in SPL on some boards. For example SPL code size for
px30-core-ctouch2-px30 increased by 40 bytes.
To address this we can take advantage of the fact that some of the ofnode
functions are only called a few times in SPL, so it is worth inlining
them.
Add new Kconfig options to control this. These functions are not inlined
for U-Boot proper, since this increases code size.
Fixes: 2ebea5eaebf ("dm: core: Combine the flattree and livetree binding code")
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/ofnode.c')
-rw-r--r-- | drivers/core/ofnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 87072094f3..2a6e43ddc6 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -226,6 +226,7 @@ int ofnode_read_u32_array(ofnode node, const char *propname, } } +#if !CONFIG_IS_ENABLED(DM_INLINE_OFNODE) bool ofnode_is_enabled(ofnode node) { if (ofnode_is_np(node)) { @@ -255,6 +256,7 @@ ofnode ofnode_next_subnode(ofnode node) return offset_to_ofnode( fdt_next_subnode(gd->fdt_blob, ofnode_to_offset(node))); } +#endif /* !DM_INLINE_OFNODE */ ofnode ofnode_get_parent(ofnode node) { |