aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2016-03-15 11:40:32 -0400
committerHeiko Stuebner <heiko@sntech.de>2016-05-09 10:04:11 -0400
commit6f339dc2719eb01448c70fe3d56287d1eb9bd67e (patch)
tree5c202cbe230546bc357b0fed0756602be3e43500
parent84752e8d8ab6bb72feab96785e9366783b4b9787 (diff)
clk: rockchip: lookup General Register Files in rockchip_clk_init
In the distant past syscons were initialized pretty late and weren't available at the time the clock init ran. As the GRF is mainly needed for PLL lock-status checking, we had this lazy init that tried to grab the syscon on PLL rate changes and denied these changes if it was not available. These days syscons are available very early and recent addition to rockchip clocks, like the PLL clk_init actually also rely on them being available at that time, so there is no need to keep that lazy init around, as it will also result in some more simplifications in other parts of the clock-code. Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r--drivers/clk/rockchip/clk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index f0a8be1553b0..9f99a4213d02 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -347,6 +347,9 @@ struct rockchip_clk_provider * __init rockchip_clk_init(struct device_node *np,
347 ctx->grf = ERR_PTR(-EPROBE_DEFER); 347 ctx->grf = ERR_PTR(-EPROBE_DEFER);
348 spin_lock_init(&ctx->lock); 348 spin_lock_init(&ctx->lock);
349 349
350 ctx->grf = syscon_regmap_lookup_by_phandle(ctx->cru_node,
351 "rockchip,grf");
352
350 return ctx; 353 return ctx;
351 354
352err_free: 355err_free:
@@ -364,9 +367,6 @@ void __init rockchip_clk_of_add_provider(struct device_node *np,
364 367
365struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx) 368struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx)
366{ 369{
367 if (IS_ERR(ctx->grf))
368 ctx->grf = syscon_regmap_lookup_by_phandle(ctx->cru_node,
369 "rockchip,grf");
370 return ctx->grf; 370 return ctx->grf;
371} 371}
372 372