From: Yuantian Tang Date: Thu, 6 Apr 2017 02:21:23 +0000 (+0800) Subject: clk: qoriq: add pll clock to clock lookup table X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45899dc5f1b5107903b2bc1c78e22d7945a895fd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 62cf32f2d7dd..0e7de00a84d2 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -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)); + } }