X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fclk%2Frockchip%2Fclk_rk3188.c;h=d4df8175f2e6d2448623eadf0cedba142b95f750;hb=1af3c7f422f627a544fec13e436d1a7975e39e73;hp=ad8df5a45902fe450064c5ada8e994d75b95394d;hpb=b75643ad0a2429e7efc7317517b47203c3c2f7c9;p=platform%2Fkernel%2Fu-boot.git diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c index ad8df5a..d4df817 100644 --- a/drivers/clk/rockchip/clk_rk3188.c +++ b/drivers/clk/rockchip/clk_rk3188.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /* * (C) Copyright 2015 Google, Inc * (C) Copyright 2016 Heiko Stuebner - * - * SPDX-License-Identifier: GPL-2.0 */ #include @@ -10,20 +9,22 @@ #include #include #include +#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include +#include #include - -DECLARE_GLOBAL_DATA_PTR; +#include enum rk3188_clk_type { RK3188_CRU, @@ -123,7 +124,7 @@ static int rkclk_configure_ddr(struct rk3188_cru *cru, struct rk3188_grf *grf, unsigned int hz, bool has_bwadj) { static const struct pll_div dpll_cfg[] = { - {.nf = 25, .nr = 2, .no = 1}, + {.nf = 75, .nr = 1, .no = 6}, {.nf = 400, .nr = 9, .no = 2}, {.nf = 500, .nr = 9, .no = 2}, {.nf = 100, .nr = 3, .no = 1}, @@ -565,6 +566,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 +594,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)