summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/drivers/core/platform.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/drivers/core/platform.c b/components/drivers/core/platform.c
index c3a141654a..d308dd0806 100644
--- a/components/drivers/core/platform.c
+++ b/components/drivers/core/platform.c
@@ -15,6 +15,9 @@
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
+#ifdef RT_USING_CLK
+#include <drivers/clk.h>
+#endif
#include <drivers/platform.h>
#include <drivers/core/bus.h>
#include <drivers/core/dm.h>
@@ -119,6 +122,13 @@ static rt_err_t platform_probe(rt_device_t dev)
struct rt_ofw_node *np = dev->ofw_node;
#endif
+#ifdef RT_USING_CLK
+ if ((err = rt_ofw_clk_set_defaults(dev->ofw_node)))
+ {
+ return err;
+ }
+#endif
+
err = rt_dm_power_domain_attach(dev, RT_TRUE);
if (err && err != -RT_EEMPTY)