Commit fa6415af authored by Lee Jones's avatar Lee Jones Committed by Stephen Boyd

clk: st: clk-flexgen: Detect critical clocks

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: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 1a695a90
...@@ -267,7 +267,6 @@ static void __init st_of_flexgen_setup(struct device_node *np) ...@@ -267,7 +267,6 @@ static void __init st_of_flexgen_setup(struct device_node *np)
const char **parents; const char **parents;
int num_parents, i; int num_parents, i;
spinlock_t *rlock = NULL; spinlock_t *rlock = NULL;
unsigned long flex_flags = 0;
int ret; int ret;
pnode = of_get_parent(np); pnode = of_get_parent(np);
...@@ -308,12 +307,15 @@ static void __init st_of_flexgen_setup(struct device_node *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++) { for (i = 0; i < clk_data->clk_num; i++) {
struct clk *clk; struct clk *clk;
const char *clk_name; const char *clk_name;
unsigned long flex_flags = 0;
if (of_property_read_string_index(np, "clock-output-names", if (of_property_read_string_index(np, "clock-output-names",
i, &clk_name)) { i, &clk_name)) {
break; break;
} }
of_clk_detect_critical(np, i, &flex_flags);
/* /*
* If we read an empty clock name then the output is unused * If we read an empty clock name then the output is unused
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment