diff options
author | Heiko Stübner | 2017-02-18 19:46:21 +0100 |
---|---|---|
committer | Simon Glass | 2017-03-16 16:03:44 -0600 |
commit | 27326c7ee269ff351bba8c2461e19f29d66b6a3a (patch) | |
tree | e64993fade9d4290d6ea79e24cdbe4885c469f52 /drivers/clk/at91 | |
parent | 2adb981207b06d93633c1a546f882dbb4dc260e4 (diff) |
dm: allow limiting pre-reloc markings to spl or tpl
Right now the u-boot,dm-pre-reloc flag will make each marked node
always appear in both spl and tpl. But systems needing an additional
tpl might have special constraints for each, like the spl needing to
be very tiny.
So introduce two additional flags to mark nodes for only spl or tpl
environments and introduce a function dm_fdt_pre_reloc to automate
the necessary checks in code instances checking for pre-relocation
flags.
The behaviour of the original flag stays untouched and still marks
a node for both spl and tpl.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/clk/at91')
-rw-r--r-- | drivers/clk/at91/pmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index c73156a0df1..fcd693a2f6f 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c @@ -10,6 +10,7 @@ #include <dm/device.h> #include <dm/lists.h> #include <dm/root.h> +#include <dm/util.h> #include "pmc.h" DECLARE_GLOBAL_DATA_PTR; @@ -56,7 +57,7 @@ int at91_clk_sub_device_bind(struct udevice *dev, const char *drv_name) offset > 0; offset = fdt_next_subnode(fdt, offset)) { if (pre_reloc_only && - !fdt_getprop(fdt, offset, "u-boot,dm-pre-reloc", NULL)) + !dm_fdt_pre_reloc(fdt, offset)) continue; /* * If this node has "compatible" property, this is not |