aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/Kconfig16
-rw-r--r--drivers/core/ofnode.c2
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index ffae6f9795..65a503e76d 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -113,6 +113,22 @@ config SPL_DM_SEQ_ALIAS
numbered devices (e.g. serial0 = &serial0). This feature can be
disabled if it is not required, to save code space in SPL.
+config SPL_DM_INLINE_OFNODE
+ bool "Inline some ofnode functions which are seldom used in SPL"
+ depends on SPL_DM
+ default y
+ help
+ This applies to several ofnode functions (see ofnode.h) which are
+ seldom used. Inlining them can help reduce code size.
+
+config TPL_DM_INLINE_OFNODE
+ bool "Inline some ofnode functions which are seldom used in TPL"
+ depends on TPL_DM
+ default y
+ help
+ This applies to several ofnode functions (see ofnode.h) which are
+ seldom used. Inlining them can help reduce code size.
+
config REGMAP
bool "Support register maps"
depends on DM
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)
{