summaryrefslogtreecommitdiffstats
path: root/drivers/core/util.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2019-08-31 18:03:28 +0200
committerMarek Vasut <marex@denx.de>2019-09-02 17:38:42 +0200
commitd7677bfc04920aa5e6a7c886a5095bcd53e0503a (patch)
tree1b7d1fda5a0139123e22caa723bca2cc4e9affe7 /drivers/core/util.c
parentd22c8be964a870f59d2fdab6c67cefa0c4799364 (diff)
downloadu-boot-d7677bfc04920aa5e6a7c886a5095bcd53e0503a.tar.gz
u-boot-d7677bfc04920aa5e6a7c886a5095bcd53e0503a.tar.xz
u-boot-d7677bfc04920aa5e6a7c886a5095bcd53e0503a.zip
dm: core: Decouple DM from DT
Some of the DM functions depend on OF_CONTROL, which is incorrect. DM and DT are orthogonal. Add macro guards around such functions to avoid compiling them in when DM is enabled, while OF_CONTROL is not. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/util.c')
-rw-r--r--drivers/core/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/core/util.c b/drivers/core/util.c
index 60b939a924..7dc1a2af02 100644
--- a/drivers/core/util.c
+++ b/drivers/core/util.c
@@ -31,6 +31,7 @@ int list_count_items(struct list_head *head)
return count;
}
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
bool dm_ofnode_pre_reloc(ofnode node)
{
#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_BUILD)
@@ -56,3 +57,4 @@ bool dm_ofnode_pre_reloc(ofnode node)
return false;
#endif
}
+#endif