ipq806x: set v4.9 as default
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.4 / 180-clk-qcom-Always-add-factor-clock-for-xo-clocks.patch
1 From patchwork Wed Nov 2 15:56:58 2016
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 Subject: [v9,3/3] clk: qcom: Always add factor clock for xo clocks
6 From: Georgi Djakov <georgi.djakov@linaro.org>
7 X-Patchwork-Id: 9409421
8 Message-Id: <20161102155658.32203-4-georgi.djakov@linaro.org>
9 To: sboyd@codeaurora.org, mturquette@baylibre.com
10 Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
11 robh+dt@kernel.org, mark.rutland@arm.com,
12 linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
13 georgi.djakov@linaro.org
14 Date: Wed, 2 Nov 2016 17:56:58 +0200
15
16 Currently the RPM/RPM-SMD clock drivers do not register the xo clocks,
17 so we should always add factor clock. When we later add xo clocks support
18 into the drivers, we should update this function to skip registration.
19 By doing so we avoid any DT dependencies.
20
21 Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
22 ---
23 drivers/clk/qcom/common.c | 15 ++++++---------
24 1 file changed, 6 insertions(+), 9 deletions(-)
25
26 --
27 To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
28 the body of a message to majordomo@vger.kernel.org
29 More majordomo info at http://vger.kernel.org/majordomo-info.html
30
31 --- a/drivers/clk/qcom/common.c
32 +++ b/drivers/clk/qcom/common.c
33 @@ -154,15 +154,12 @@ int qcom_cc_register_board_clk(struct de
34 const char *name, unsigned long rate)
35 {
36 bool add_factor = true;
37 - struct device_node *node;
38
39 - /* The RPM clock driver will add the factor clock if present */
40 - if (IS_ENABLED(CONFIG_QCOM_RPMCC)) {
41 - node = of_find_compatible_node(NULL, NULL, "qcom,rpmcc");
42 - if (of_device_is_available(node))
43 - add_factor = false;
44 - of_node_put(node);
45 - }
46 + /*
47 + * TODO: The RPM clock driver currently does not support the xo clock.
48 + * When xo is added to the RPM clock driver, we should change this
49 + * function to skip registration of xo factor clocks.
50 + */
51
52 return _qcom_cc_register_board_clk(dev, path, name, rate, add_factor);
53 }