kernel: update 3.14 to 3.14.18
[openwrt.git] / target / linux / sunxi / patches-3.14 / 182-clk-sunxi-get-divs-parent-clockname.patch
1 From 0566b74f93eaf6b2281d2605a63e06e6ba809334 Mon Sep 17 00:00:00 2001
2 From: Chen-Yu Tsai <wens@csie.org>
3 Date: Mon, 3 Feb 2014 09:51:40 +0800
4 Subject: [PATCH] clk: sunxi: get divs parent clock name from parent factor
5  clock
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Divs clocks consist of a parent factor clock with multiple outputs,
11 and seperate clocks for each output. Get the name of the parent
12 clock from the parent factor clock, instead of the DT node name.
13
14 Signed-off-by: Chen-Yu Tsai <wens@csie.org>
15 Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
16 Acked-by: Mike Turquette <mturquette@linaro.org>
17 Signed-off-by: Emilio López <emilio@elopez.com.ar>
18 ---
19  drivers/clk/sunxi/clk-sunxi.c | 3 ++-
20  1 file changed, 2 insertions(+), 1 deletion(-)
21
22 --- a/drivers/clk/sunxi/clk-sunxi.c
23 +++ b/drivers/clk/sunxi/clk-sunxi.c
24 @@ -940,7 +940,7 @@ static void __init sunxi_divs_clk_setup(
25                                         struct divs_data *data)
26  {
27         struct clk_onecell_data *clk_data;
28 -       const char *parent  = node->name;
29 +       const char *parent;
30         const char *clk_name;
31         struct clk **clks, *pclk;
32         struct clk_hw *gate_hw, *rate_hw;
33 @@ -954,6 +954,7 @@ static void __init sunxi_divs_clk_setup(
34  
35         /* Set up factor clock that we will be dividing */
36         pclk = sunxi_factors_clk_setup(node, data->factors);
37 +       parent = __clk_get_name(pclk);
38  
39         reg = of_iomap(node, 0);
40