common: Drop linux/delay.h from common header
[oweals/u-boot.git] / drivers / clk / rockchip / clk_rk3188.c
index cfe6abe470104a514fb5dd24acbb1a3aeebe3062..11e3bd33cbeadadeb4de22079b191814a0c74df0 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) Copyright 2015 Google, Inc
  * (C) Copyright 2016 Heiko Stuebner <heiko@sntech.de>
- *
- * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
+#include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
 #include <asm/io.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/cru_rk3188.h>
-#include <asm/arch/grf_rk3188.h>
-#include <asm/arch/hardware.h>
+#include <asm/arch-rockchip/clock.h>
+#include <asm/arch-rockchip/cru_rk3188.h>
+#include <asm/arch-rockchip/grf_rk3188.h>
+#include <asm/arch-rockchip/hardware.h>
 #include <dt-bindings/clock/rk3188-cru.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
+#include <linux/err.h>
 #include <linux/log2.h>
-
-DECLARE_GLOBAL_DATA_PTR;
+#include <linux/stringify.h>
 
 enum rk3188_clk_type {
        RK3188_CRU,
@@ -565,6 +567,9 @@ static int rk3188_clk_probe(struct udevice *dev)
 #endif
 
        rkclk_init(priv->cru, priv->grf, priv->has_bwadj);
+
+       /* Init CPU frequency */
+       rkclk_configure_cpu(priv->cru, priv->grf, APLL_HZ, priv->has_bwadj);
 #endif
 
        return 0;
@@ -590,7 +595,7 @@ static int rk3188_clk_bind(struct udevice *dev)
                sys_child->priv = priv;
        }
 
-#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
        ret = offsetof(struct rk3188_cru, cru_softrst_con[0]);
        ret = rockchip_reset_bind(dev, ret, 9);
        if (ret)