aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
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-mmp
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-mmp')
-rw-r--r--arch/arm/mach-mmp/clock.c8
-rw-r--r--arch/arm/mach-mmp/clock.h2
-rw-r--r--arch/arm/mach-mmp/pxa168.c2
-rw-r--r--arch/arm/mach-mmp/pxa910.c2
4 files changed, 2 insertions, 12 deletions
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c
index 2a46ed5cc2a2..886e05648f08 100644
--- a/arch/arm/mach-mmp/clock.c
+++ b/arch/arm/mach-mmp/clock.c
@@ -88,11 +88,3 @@ unsigned long clk_get_rate(struct clk *clk)
88 return rate; 88 return rate;
89} 89}
90EXPORT_SYMBOL(clk_get_rate); 90EXPORT_SYMBOL(clk_get_rate);
91
92void clks_register(struct clk_lookup *clks, size_t num)
93{
94 int i;
95
96 for (i = 0; i < num; i++)
97 clkdev_add(&clks[i]);
98}
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h
index eefffbe683b0..016ae94691c0 100644
--- a/arch/arm/mach-mmp/clock.h
+++ b/arch/arm/mach-mmp/clock.h
@@ -68,5 +68,3 @@ struct clk clk_##_name = { \
68 68
69extern struct clk clk_pxa168_gpio; 69extern struct clk clk_pxa168_gpio;
70extern struct clk clk_pxa168_timers; 70extern struct clk clk_pxa168_timers;
71
72extern void clks_register(struct clk_lookup *, size_t);
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 37dbdde17fac..1873c821df90 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -94,7 +94,7 @@ static int __init pxa168_init(void)
94 mfp_init_base(MFPR_VIRT_BASE); 94 mfp_init_base(MFPR_VIRT_BASE);
95 mfp_init_addr(pxa168_mfp_addr_map); 95 mfp_init_addr(pxa168_mfp_addr_map);
96 pxa_init_dma(IRQ_PXA168_DMA_INT0, 32); 96 pxa_init_dma(IRQ_PXA168_DMA_INT0, 32);
97 clks_register(ARRAY_AND_SIZE(pxa168_clkregs)); 97 clkdev_add_table(ARRAY_AND_SIZE(pxa168_clkregs));
98 } 98 }
99 99
100 return 0; 100 return 0;
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
index d4049508a4df..46f2d69bef3c 100644
--- a/arch/arm/mach-mmp/pxa910.c
+++ b/arch/arm/mach-mmp/pxa910.c
@@ -131,7 +131,7 @@ static int __init pxa910_init(void)
131 mfp_init_base(MFPR_VIRT_BASE); 131 mfp_init_base(MFPR_VIRT_BASE);
132 mfp_init_addr(pxa910_mfp_addr_map); 132 mfp_init_addr(pxa910_mfp_addr_map);
133 pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); 133 pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
134 clks_register(ARRAY_AND_SIZE(pxa910_clkregs)); 134 clkdev_add_table(ARRAY_AND_SIZE(pxa910_clkregs));
135 } 135 }
136 136
137 return 0; 137 return 0;