summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-02-15 04:33:25 +0100
committerHeiko Stuebner <heiko@sntech.de>2016-02-15 22:38:27 +0100
commiteb4e10c61ddb513dae6508a16eedd2da59effb98 (patch)
tree918afd22493cee418c84d0f8893dd08349e169a9 /drivers/clk
parentclk: rockchip: disable alt_parent clk in err cases when registering cpuclk (diff)
downloadlinux-eb4e10c61ddb513dae6508a16eedd2da59effb98.tar.xz
linux-eb4e10c61ddb513dae6508a16eedd2da59effb98.zip
clk: rockchip: check grf when waiting pll lock
rockchip_clk_get_grf pass on return value from syscon_regmap_lookup_by_phandle, so we check grf to make sure whether to do the following things or not. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/rockchip/clk-pll.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index b7e66c9dd9f2..5de797e34d54 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -94,6 +94,11 @@ static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll)
unsigned int val;
int delay = 24000000, ret;
+ if (IS_ERR(grf)) {
+ pr_err("%s: grf regmap not available\n", __func__);
+ return PTR_ERR(grf);
+ }
+
while (delay > 0) {
ret = regmap_read(grf, pll->lock_offset, &val);
if (ret) {