aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-12 07:28:00 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-12 12:32:36 -0500
commit0a0300dc8c4b3f3ce5c9ef5a0a4be5442590398f (patch)
treee9a0a9dc5f195447f44a077f76c8d61e2c955d17 /arch/arm/mach-w90x900
parent92dcffb916d309aa01778bf8963a6932e4014d07 (diff)
ARM: Consolidate clks_register() and similar
Most machine classes want some way to register a block of clk_lookup structures, and most do it by implementing a clks_register() type function which walks an array, or by open-coding a loop. Consolidate all this into clkdev_add_table(). Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900')
-rw-r--r--arch/arm/mach-w90x900/clock.c9
-rw-r--r--arch/arm/mach-w90x900/clock.h1
-rw-r--r--arch/arm/mach-w90x900/cpu.c2
3 files changed, 1 insertions, 11 deletions
diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c
index b785994bab0a..2c371ff22e51 100644
--- a/arch/arm/mach-w90x900/clock.c
+++ b/arch/arm/mach-w90x900/clock.c
@@ -90,12 +90,3 @@ void nuc900_subclk_enable(struct clk *clk, int enable)
90 90
91 __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK); 91 __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK);
92} 92}
93
94
95void clks_register(struct clk_lookup *clks, size_t num)
96{
97 int i;
98
99 for (i = 0; i < num; i++)
100 clkdev_add(&clks[i]);
101}
diff --git a/arch/arm/mach-w90x900/clock.h b/arch/arm/mach-w90x900/clock.h
index f5816a06eed6..c56ddab3d912 100644
--- a/arch/arm/mach-w90x900/clock.h
+++ b/arch/arm/mach-w90x900/clock.h
@@ -14,7 +14,6 @@
14 14
15void nuc900_clk_enable(struct clk *clk, int enable); 15void nuc900_clk_enable(struct clk *clk, int enable);
16void nuc900_subclk_enable(struct clk *clk, int enable); 16void nuc900_subclk_enable(struct clk *clk, int enable);
17void clks_register(struct clk_lookup *clks, size_t num);
18 17
19struct clk { 18struct clk {
20 unsigned long cken; 19 unsigned long cken;
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
index 20dc0c96214d..6f5ca532883f 100644
--- a/arch/arm/mach-w90x900/cpu.c
+++ b/arch/arm/mach-w90x900/cpu.c
@@ -208,6 +208,6 @@ void __init nuc900_map_io(struct map_desc *mach_desc, int mach_size)
208 208
209void __init nuc900_init_clocks(void) 209void __init nuc900_init_clocks(void)
210{ 210{
211 clks_register(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs)); 211 clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs));
212} 212}
213 213