From 2aeabcb857e32494bdb8385a2fb5c8c529fe35be Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Thu, 13 Feb 2014 13:27:14 +0000 Subject: upgrade 3.13 targets to 3.13.2, refresh patches Signed-off-by: Imre Kaloz drivers/clk/sunxi/clk-sunxi.c | 37 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) -diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt -index e840cb2..941bd93 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt @@ -15,6 +15,7 @@ Required properties: @@ -27,11 +25,9 @@ index e840cb2..941bd93 100644 "allwinner,sun4i-ahb-gates-clk" - for the AHB gates on A10 "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s -diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c -index ea3edeb..625089b 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c -@@ -249,7 +249,32 @@ static void sun4i_get_pll5_factors(u32 *freq, u32 parent_rate, +@@ -249,7 +249,32 @@ static void sun4i_get_pll5_factors(u32 * *n = DIV_ROUND_UP(div, (*k+1)); } @@ -40,7 +36,7 @@ index ea3edeb..625089b 100644 + * AHB rate is calculated as follows + * rate = parent_rate >> p + */ - ++ +static void sun5i_a13_get_ahb_factors(u32 *freq, u32 parent_rate, + u8 *n, u8 *k, u8 *m, u8 *p) +{ @@ -58,13 +54,13 @@ index ea3edeb..625089b 100644 + /* we were called to round the frequency, we can now return */ + if (n == NULL) + return; -+ + + *p = div; +} /** * sun4i_get_apb1_factors() - calculates m, p factors for APB1 -@@ -375,6 +400,11 @@ struct factors_data { +@@ -375,6 +400,11 @@ static struct clk_factors_config sun4i_p .kwidth = 2, }; @@ -76,7 +72,7 @@ index ea3edeb..625089b 100644 static struct clk_factors_config sun4i_apb1_config = { .mshift = 0, .mwidth = 5, -@@ -408,6 +438,12 @@ struct factors_data { +@@ -408,6 +438,12 @@ static const struct factors_data sun4i_p .getter = sun4i_get_pll5_factors, }; @@ -87,9 +83,9 @@ index ea3edeb..625089b 100644 +}; + static const struct factors_data sun4i_apb1_data __initconst = { - .mux = 24, .table = &sun4i_apb1_config, -@@ -913,6 +949,7 @@ static void __init sunxi_divs_clk_setup(struct device_node *node, + .getter = sun4i_get_apb1_factors, +@@ -916,6 +952,7 @@ free_clkdata: static const struct of_device_id clk_factors_match[] __initconst = { {.compatible = "allwinner,sun4i-pll1-clk", .data = &sun4i_pll1_data,}, {.compatible = "allwinner,sun6i-a31-pll1-clk", .data = &sun6i_a31_pll1_data,}, @@ -97,6 +93,3 @@ index ea3edeb..625089b 100644 {.compatible = "allwinner,sun4i-apb1-clk", .data = &sun4i_apb1_data,}, {.compatible = "allwinner,sun4i-mod0-clk", .data = &sun4i_mod0_data,}, {} --- -1.8.5.1 - -- cgit v1.2.3