Skip to contentSkip to conversation

sh: move sh clock.c contents to drivers/sh/clk.

PATCH New Magnus Damm 1 participant 1 message May 11, 2010 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 sh: move sh clock.c contents to drivers/sh/clk.

From: Magnus Damm <[email protected]>

This patch is V2 of the SH clock framework move from arch/sh/kernel/cpu/clock.c to drivers/sh/clk.c. All code except the following functions are moved:
clk_init(), clk_get() and clk_put().

The init function is still kept in clock.c since it depends on the SH-specific machvec implementation.

The symbols clk_get() and clk_put() already exist in the common ARM clkdev code, those symbols are left in the SH tree to avoid duplicating them for SH-Mobile ARM.

---

 arch/sh/include/asm/clock.h |    3 
 arch/sh/kernel/cpu/clock.c  |  543 ------------------------------------------
 drivers/sh/Makefile         |    1 
 drivers/sh/clk.c            |  548 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/sh_clk.h      |    2 
 5 files changed, 561 insertions(+), 536 deletions(-)
arch/sh/include/asm/clock.h +3 -0
@@ -10,4 +10,7 @@ int __init arch_clk_init(void);
 /* arch/sh/kernel/cpu/clock-cpg.c */
 int __init __deprecated cpg_clk_init(void);
 
+/* arch/sh/kernel/cpu/clock.c */
+int clk_init(void);
+
 #endif /* __ASM_SH_CLOCK_H */
arch/sh/kernel/cpu/clock.c +8 -535

564 lines not on this page · raw message

drivers/sh/Makefile +1 -0
@@ -4,4 +4,5 @@
 obj-$(CONFIG_SUPERHYWAY)	+= superhyway/
 obj-$(CONFIG_MAPLE)		+= maple/
 obj-$(CONFIG_GENERIC_GPIO)	+= pfc.o
+obj-$(CONFIG_SUPERH)		+= clk.o
 obj-y				+= intc.o
drivers/sh/clk.c new file +548 -0

548 lines not on this page · raw message

include/linux/sh_clk.h +1 -1
@@ -47,13 +47,13 @@ struct clk {
 #define CLK_ENABLE_ON_INIT	(1 << 0)
 
 /* arch/sh/kernel/cpu/clock.c */
-int clk_init(void);
 unsigned long followparent_recalc(struct clk *);
 void recalculate_root_clocks(void);
 void propagate_rate(struct clk *);
 int clk_reparent(struct clk *child, struct clk *parent);
 int clk_register(struct clk *);
 void clk_unregister(struct clk *);
+void clk_enable_init_clocks(void);
 
 /* the exported API, in addition to clk_set_rate */
 /**