]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: clkfwk: Make clock-cpg usable for non-legacy platforms.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 22 May 2009 05:00:34 +0000 (14:00 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 22 May 2009 05:00:34 +0000 (14:00 +0900)
This adds a new SH_CLK_CPG for parts that have CPG support.
SH_CLK_CPG_LEGACY is made to depend on this, and still needs to be set
for platforms that want clock-cpg to register the legacy clocks. With
this new config item in place, it is now possible to start layering more
generic CPG code in place while other platforms transition off of the
legacy clocks.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig
arch/sh/kernel/cpu/Makefile
arch/sh/kernel/cpu/clock-cpg.c

index df764c56b05085c882b3f59a8e7e57db7fd2f8f4..c815975b8d75ebc20994b9ce3660946045356b6d 100644 (file)
@@ -513,7 +513,11 @@ config SH_PCLK_FREQ
          This is necessary for determining the reference clock value on
          platforms lacking an RTC.
 
+config SH_CLK_CPG
+       def_bool y
+
 config SH_CLK_CPG_LEGACY
+       depends on SH_CLK_CPG
        def_bool y if !CPU_SUBTYPE_SH7785
 
 config SH_CLK_MD
index 05105b980c21b62b2e47515289d142fcf4ffce1a..eecad7cbd61e98f70beaa5699c5379f6886624cd 100644 (file)
@@ -17,6 +17,6 @@ obj-$(CONFIG_ARCH_SHMOBILE)   += shmobile/
 
 obj-$(CONFIG_UBC_WAKEUP)       += ubc.o
 obj-$(CONFIG_SH_ADC)           += adc.o
-obj-$(CONFIG_SH_CLK_CPG_LEGACY)        += clock-cpg.o
+obj-$(CONFIG_SH_CLK_CPG)       += clock-cpg.o
 
 obj-y  += irq/ init.o clock.o
index b4ca20048446e498f327f280ea68500bb72d8759..b78c237ab3666612ca114a352e7e0ed9a9ee5796 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/compiler.h>
 #include <asm/clock.h>
 
+#ifdef CONFIG_SH_CLK_CPG_LEGACY
 static struct clk master_clk = {
        .name           = "master_clk",
        .flags          = CLK_ENABLE_ON_INIT,
@@ -58,3 +59,4 @@ int __init __weak arch_clk_init(void)
 {
        return cpg_clk_init();
 }
+#endif /* CONFIG_SH_CPG_CLK_LEGACY */