diff options
author | Yuantian Tang <andy.tang@nxp.com> | 2017-04-06 02:11:28 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-07-14 10:29:03 (GMT) |
commit | 7317a8a3b33fde57fe6862e979be48c606b565b5 (patch) | |
tree | 7754521899e8c6adf0a1590401f03c42782b43d1 /drivers/clk | |
parent | b688934826e9d199c61f4a9fac18db74eb8caff7 (diff) | |
download | linux-7317a8a3b33fde57fe6862e979be48c606b565b5.tar.xz |
clk: qoriq: add pll clock to clock lookup table
Register each PLL and its division clocks to clock
lookup table to facilitate the clock look up for
clock consumer.
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-qoriq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 62cf32f..0e7de00 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -12,6 +12,7 @@ #include <linux/clk.h> #include <linux/clk-provider.h> +#include <linux/clkdev.h> #include <linux/fsl/guts.h> #include <linux/io.h> #include <linux/kernel.h> @@ -1124,6 +1125,7 @@ static void __init create_one_pll(struct clockgen *cg, int idx) for (i = 0; i < ARRAY_SIZE(pll->div); i++) { struct clk *clk; + int ret; snprintf(pll->div[i].name, sizeof(pll->div[i].name), "cg-pll%d-div%d", idx, i + 1); @@ -1137,6 +1139,11 @@ static void __init create_one_pll(struct clockgen *cg, int idx) } pll->div[i].clk = clk; + ret = clk_register_clkdev(clk, pll->div[i].name, NULL); + if (ret != 0) + pr_err("%s: %s: register to lookup table failed %ld\n", + __func__, pll->div[i].name, PTR_ERR(clk)); + } } |