clk: rockchip: allow more than 2 parents for cpuclk
authorJeffy Chen <jeffy.chen@rock-chips.com>
Wed, 9 Dec 2015 09:04:10 +0000 (17:04 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Fri, 15 Jan 2016 09:52:15 +0000 (17:52 +0800)
RK3228's armclk has 3 parents, so allow cpuclk to have
more than 2 parents.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from linux-next.git
commit ea03835fb8ea4abbad2a2154187401f55c0b932d)

Change-Id: Iddb60e4f7bda91b98b4a3e42f196eee510173dce
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
drivers/clk/rockchip/clk-cpu.c

index 330870a6d8bfa9163405398ff3de7e1eb0d8a864..d07374f48caf7ee6d8c5b8f6ed82cca089e964d0 100644 (file)
@@ -242,8 +242,8 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
        struct clk *clk, *cclk;
        int ret;
 
-       if (num_parents != 2) {
-               pr_err("%s: needs two parent clocks\n", __func__);
+       if (num_parents < 2) {
+               pr_err("%s: needs at least two parent clocks\n", __func__);
                return ERR_PTR(-EINVAL);
        }