summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-07-31 07:01:49 +0000
committerLukasz Majewski <lukma@denx.de>2019-07-31 09:20:51 +0200
commit91944ef09d603f6aa41649b2a1fdd64fea9651f9 (patch)
tree1608b5c8110e36bf310ba24011c956bb02ccf0e9 /drivers/clk
parent4b91ec076d800b3ca535dfd99b79798094bd4e52 (diff)
downloadu-boot-91944ef09d603f6aa41649b2a1fdd64fea9651f9.tar.gz
u-boot-91944ef09d603f6aa41649b2a1fdd64fea9651f9.tar.bz2
u-boot-91944ef09d603f6aa41649b2a1fdd64fea9651f9.zip
dm: clk: ignore default settings when node not valid
When the device not binded with a node, we need ignore the parents and rate settings. Cc: Simon Glass <sjg@chromium.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-uclass.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 85dfe712f5..cee4d912b0 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -285,6 +285,9 @@ int clk_set_defaults(struct udevice *dev)
{
int ret;
+ if (!dev_of_valid(dev))
+ return 0;
+
/* If this not in SPL and pre-reloc state, don't take any action. */
if (!(IS_ENABLED(CONFIG_SPL_BUILD) || (gd->flags & GD_FLG_RELOC)))
return 0;