diff options
author | Rich Felker <dalias@libc.org> | 2016-07-31 06:11:30 +0300 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2016-08-05 06:29:45 +0300 |
commit | 15f0c8f2f378a05fe7b25e545c353a6b5cf5126a (patch) | |
tree | a197be242f661f87b455def1c68ca349f0ce8833 /arch | |
parent | 74bdaa611fa69368fb4032ad437af073d31116bd (diff) | |
download | linux-15f0c8f2f378a05fe7b25e545c353a6b5cf5126a.tar.xz |
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: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/boards/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index e0db04664e2e..e9c2c42031fe 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig @@ -11,6 +11,7 @@ config SH_DEVICE_TREE select OF select OF_EARLY_FLATTREE select CLKSRC_OF + select COMMON_CLK select GENERIC_CALIBRATE_DELAY help Select Board Described by Device Tree to build a kernel that diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 4187cf4fe185..fca9b1e78a63 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c @@ -24,11 +24,13 @@ int __init clk_init(void) { int ret; +#ifndef CONFIG_COMMON_CLK ret = arch_clk_init(); if (unlikely(ret)) { pr_err("%s: CPU clock registration failed.\n", __func__); return ret; } +#endif if (sh_mv.mv_clk_init) { ret = sh_mv.mv_clk_init(); @@ -39,11 +41,13 @@ int __init clk_init(void) } } +#ifndef CONFIG_COMMON_CLK /* Kick the child clocks.. */ recalculate_root_clocks(); /* Enable the necessary init clocks */ clk_enable_init_clocks(); +#endif return ret; } |