ipq806x: enable QCE hardware crypto inside the kernel
[oweals/openwrt.git] / target / linux / ipq806x / patches-4.9 / 0058-clk-qcom-Always-add-factor-clock-for-xo-clocks.patch
1 From 6081776c1eef63e3083387bb9ec2bf7edf92428b Mon Sep 17 00:00:00 2001
2 From: Georgi Djakov <georgi.djakov@linaro.org>
3 Date: Wed, 2 Nov 2016 17:56:58 +0200
4 Subject: [PATCH 58/69] clk: qcom: Always add factor clock for xo clocks
5
6 Currently the RPM/RPM-SMD clock drivers do not register the xo clocks,
7 so we should always add factor clock. When we later add xo clocks support
8 into the drivers, we should update this function to skip registration.
9 By doing so we avoid any DT dependencies.
10
11 Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
12 ---
13  drivers/clk/qcom/common.c | 15 ++++++---------
14  1 file changed, 6 insertions(+), 9 deletions(-)
15
16 --- a/drivers/clk/qcom/common.c
17 +++ b/drivers/clk/qcom/common.c
18 @@ -153,15 +153,12 @@ int qcom_cc_register_board_clk(struct de
19                                const char *name, unsigned long rate)
20  {
21         bool add_factor = true;
22 -       struct device_node *node;
23  
24 -       /* The RPM clock driver will add the factor clock if present */
25 -       if (IS_ENABLED(CONFIG_QCOM_RPMCC)) {
26 -               node = of_find_compatible_node(NULL, NULL, "qcom,rpmcc");
27 -               if (of_device_is_available(node))
28 -                       add_factor = false;
29 -               of_node_put(node);
30 -       }
31 +       /*
32 +        * TODO: The RPM clock driver currently does not support the xo clock.
33 +        * When xo is added to the RPM clock driver, we should change this
34 +        * function to skip registration of xo factor clocks.
35 +        */
36  
37         return _qcom_cc_register_board_clk(dev, path, name, rate, add_factor);
38  }