Commit 15f0c8f2 authored by Rich Felker's avatar Rich Felker

sh: use common clock framework with device tree boards

Enable common clk framework for DT-based boards and disable code that
depends on the legacy sh clk framework when common clk is enabled.
Once legacy drivers are converted over, the old code can be removed
entirely.
Signed-off-by: default avatarRich Felker <dalias@libc.org>
parent 74bdaa61
...@@ -11,6 +11,7 @@ config SH_DEVICE_TREE ...@@ -11,6 +11,7 @@ config SH_DEVICE_TREE
select OF select OF
select OF_EARLY_FLATTREE select OF_EARLY_FLATTREE
select CLKSRC_OF select CLKSRC_OF
select COMMON_CLK
select GENERIC_CALIBRATE_DELAY select GENERIC_CALIBRATE_DELAY
help help
Select Board Described by Device Tree to build a kernel that Select Board Described by Device Tree to build a kernel that
......
...@@ -24,11 +24,13 @@ int __init clk_init(void) ...@@ -24,11 +24,13 @@ int __init clk_init(void)
{ {
int ret; int ret;
#ifndef CONFIG_COMMON_CLK
ret = arch_clk_init(); ret = arch_clk_init();
if (unlikely(ret)) { if (unlikely(ret)) {
pr_err("%s: CPU clock registration failed.\n", __func__); pr_err("%s: CPU clock registration failed.\n", __func__);
return ret; return ret;
} }
#endif
if (sh_mv.mv_clk_init) { if (sh_mv.mv_clk_init) {
ret = sh_mv.mv_clk_init(); ret = sh_mv.mv_clk_init();
...@@ -39,11 +41,13 @@ int __init clk_init(void) ...@@ -39,11 +41,13 @@ int __init clk_init(void)
} }
} }
#ifndef CONFIG_COMMON_CLK
/* Kick the child clocks.. */ /* Kick the child clocks.. */
recalculate_root_clocks(); recalculate_root_clocks();
/* Enable the necessary init clocks */ /* Enable the necessary init clocks */
clk_enable_init_clocks(); clk_enable_init_clocks();
#endif
return ret; return ret;
} }
......
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