Merge tag 'clk-for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/clk...
[firefly-linux-kernel-4.4.55.git] / drivers / clk / rockchip / clk.c
index 880a266f01431b3b9e7040565d3a3e81f0716a8b..edb5d489ae61859c5853d2ece634bd5d3e397f73 100644 (file)
@@ -197,7 +197,8 @@ void __init rockchip_clk_register_plls(struct rockchip_pll_clock *list,
                                list->parent_names, list->num_parents,
                                reg_base, list->con_offset, grf_lock_offset,
                                list->lock_shift, list->mode_offset,
-                               list->mode_shift, list->rate_table, &clk_lock);
+                               list->mode_shift, list->rate_table,
+                               list->pll_flags, &clk_lock);
                if (IS_ERR(clk)) {
                        pr_err("%s: failed to register clock %s\n", __func__,
                                list->name);
@@ -244,9 +245,6 @@ void __init rockchip_clk_register_branches(
                                        list->div_flags, &clk_lock);
                        break;
                case branch_fraction_divider:
-                       /* keep all gates untouched for now */
-                       flags |= CLK_IGNORE_UNUSED;
-
                        clk = rockchip_clk_register_frac_branch(list->name,
                                list->parent_names, list->num_parents,
                                reg_base, list->muxdiv_offset, list->div_flags,
@@ -256,18 +254,12 @@ void __init rockchip_clk_register_branches(
                case branch_gate:
                        flags |= CLK_SET_RATE_PARENT;
 
-                       /* keep all gates untouched for now */
-                       flags |= CLK_IGNORE_UNUSED;
-
                        clk = clk_register_gate(NULL, list->name,
                                list->parent_names[0], flags,
                                reg_base + list->gate_offset,
                                list->gate_shift, list->gate_flags, &clk_lock);
                        break;
                case branch_composite:
-                       /* keep all gates untouched for now */
-                       flags |= CLK_IGNORE_UNUSED;
-
                        clk = rockchip_clk_register_branch(list->name,
                                list->parent_names, list->num_parents,
                                reg_base, list->muxdiv_offset, list->mux_shift,
@@ -277,6 +269,14 @@ void __init rockchip_clk_register_branches(
                                list->gate_offset, list->gate_shift,
                                list->gate_flags, flags, &clk_lock);
                        break;
+               case branch_mmc:
+                       clk = rockchip_clk_register_mmc(
+                               list->name,
+                               list->parent_names, list->num_parents,
+                               reg_base + list->muxdiv_offset,
+                               list->div_shift
+                       );
+                       break;
                }
 
                /* none of the cases above matched */
@@ -317,7 +317,8 @@ void __init rockchip_clk_register_armclk(unsigned int lookup_id,
        rockchip_clk_add_lookup(clk, lookup_id);
 }
 
-void __init rockchip_clk_protect_critical(const char *clocks[], int nclocks)
+void __init rockchip_clk_protect_critical(const char *const clocks[],
+                                         int nclocks)
 {
        int i;