clk: sunxi: unify APB1 clock
authorEmilio López <emilio@elopez.com.ar>
Thu, 6 Nov 2014 03:40:29 +0000 (11:40 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 11 Nov 2014 14:54:40 +0000 (15:54 +0100)
This commit unifies the APB1 mux with the APB1 clock, using the new
factors infrastructure.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
[wens@csie.org: Add mux mask bits]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Documentation/devicetree/bindings/clock/sunxi.txt
drivers/clk/sunxi/clk-sunxi.c

index 0455cb9caa973f75ccc253264f8076b0a6c226f4..6ddcf6e10eb865340c731c7da991880309527470 100644 (file)
@@ -45,7 +45,6 @@ Required properties:
        "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80
        "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock
        "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80
-       "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing
        "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10
        "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13
        "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s
index 20f47c68a946eb61980bfe8864c76868469b0f49..4133e278212b5b41bc0134ba530f2aea07a6c717 100644 (file)
@@ -507,6 +507,8 @@ static const struct factors_data sun6i_a31_pll6_data __initconst = {
 };
 
 static const struct factors_data sun4i_apb1_data __initconst = {
+       .mux = 24,
+       .muxmask = BIT(1) | BIT(0),
        .table = &sun4i_apb1_config,
        .getter = sun4i_get_apb1_factors,
 };
@@ -545,10 +547,6 @@ static const struct mux_data sun6i_a31_ahb1_mux_data __initconst = {
        .shift = 12,
 };
 
-static const struct mux_data sun4i_apb1_mux_data __initconst = {
-       .shift = 24,
-};
-
 static void __init sunxi_mux_clk_setup(struct device_node *node,
                                       struct mux_data *data)
 {
@@ -1109,7 +1107,6 @@ static const struct of_device_id clk_divs_match[] __initconst = {
 /* Matches for mux clocks */
 static const struct of_device_id clk_mux_match[] __initconst = {
        {.compatible = "allwinner,sun4i-a10-cpu-clk", .data = &sun4i_cpu_mux_data,},
-       {.compatible = "allwinner,sun4i-a10-apb1-mux-clk", .data = &sun4i_apb1_mux_data,},
        {.compatible = "allwinner,sun6i-a31-ahb1-mux-clk", .data = &sun6i_a31_ahb1_mux_data,},
        {}
 };