sunxi: rework target - update kernel to 3.12 - add patches for clocks, i2c, usb,...
[openwrt/openwrt.git] / target / linux / sunxi / patches-3.12 / 101-clk-sunxi_add-gating-pll1.patch
1 From 68557a66b206de79a4556d393d51865407525d52 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar>
3 Date: Mon, 6 May 2013 09:59:00 -0300
4 Subject: [PATCH] clk: sunxi: add gating support to PLL1
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This commit adds gating support to PLL1 on the clock driver. This makes
10 the PLL1 implementation fully compatible with PLL4 as well.
11
12 Signed-off-by: Emilio López <emilio@elopez.com.ar>
13 ---
14 Documentation/devicetree/bindings/clock/sunxi.txt | 2 +-
15 drivers/clk/sunxi/clk-sunxi.c | 2 ++
16 2 files changed, 3 insertions(+), 1 deletion(-)
17
18 diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
19 index 00a5c264..7d9245f 100644
20 --- a/Documentation/devicetree/bindings/clock/sunxi.txt
21 +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
22 @@ -7,7 +7,7 @@ This binding uses the common clock binding[1].
23 Required properties:
24 - compatible : shall be one of the following:
25 "allwinner,sun4i-osc-clk" - for a gatable oscillator
26 - "allwinner,sun4i-pll1-clk" - for the main PLL clock
27 + "allwinner,sun4i-pll1-clk" - for the main PLL clock and PLL4
28 "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31
29 "allwinner,sun4i-cpu-clk" - for the CPU multiplexer clock
30 "allwinner,sun4i-axi-clk" - for the AXI clock
31 diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
32 index 6aed57f..c0b0675 100644
33 --- a/drivers/clk/sunxi/clk-sunxi.c
34 +++ b/drivers/clk/sunxi/clk-sunxi.c
35 @@ -293,11 +293,13 @@ struct factors_data {
36 };
37
38 static const struct factors_data sun4i_pll1_data __initconst = {
39 + .enable = 31,
40 .table = &sun4i_pll1_config,
41 .getter = sun4i_get_pll1_factors,
42 };
43
44 static const struct factors_data sun6i_a31_pll1_data __initconst = {
45 + .enable = 31,
46 .table = &sun6i_a31_pll1_config,
47 .getter = sun6i_a31_get_pll1_factors,
48 };
49 --
50 1.8.4
51