]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
clk: st: clk-flexgen: Detect critical clocks
authorLee Jones <lee.jones@linaro.org>
Tue, 7 Jun 2016 11:19:25 +0000 (12:19 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 30 Jun 2016 19:17:06 +0000 (12:17 -0700)
Utilise the new Critical Clock infrastructure to mark clocks which
much not be disabled as CRITICAL.

While we're at it, reduce the coverage of the flex_flags variable,
since it's only really used in a single for() loop.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/st/clk-flexgen.c

index 627267c7ec5c0be3a09ca12fca851e039e0baf06..546bd79c8e3a68eb86ccd7b51f50bf5225b15f62 100644 (file)
@@ -267,7 +267,6 @@ static void __init st_of_flexgen_setup(struct device_node *np)
        const char **parents;
        int num_parents, i;
        spinlock_t *rlock = NULL;
-       unsigned long flex_flags = 0;
        int ret;
 
        pnode = of_get_parent(np);
@@ -308,12 +307,15 @@ static void __init st_of_flexgen_setup(struct device_node *np)
        for (i = 0; i < clk_data->clk_num; i++) {
                struct clk *clk;
                const char *clk_name;
+               unsigned long flex_flags = 0;
 
                if (of_property_read_string_index(np, "clock-output-names",
                                                  i, &clk_name)) {
                        break;
                }
 
+               of_clk_detect_critical(np, i, &flex_flags);
+
                /*
                 * If we read an empty clock name then the output is unused
                 */