aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-dove/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-12-15 02:15:07 -0500
committerMike Turquette <mturquette@linaro.org>2012-05-08 19:33:39 -0400
commit2f129bf4aab684bef1e82e747b709a5025ecb698 (patch)
tree4be6e04fc306cfad25b3b86f831cd4d462c10f44 /arch/arm/mach-dove/common.c
parentf0948f59dbc8e725a96ba16da666e8f5cdd43ba8 (diff)
ARM: Orion: Add clocks using the generic clk infrastructure.
Add tclk as a fixed rate clock for all platforms. In addition, on kirkwood, add a gated clock for most of the clocks which can be gated. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Jamie Lentin <jm@lentin.co.uk> [mturquette@linaro.org: removed redundant CLKDEV_LOOKUP from Kconfig] [mturquette@linaro.org: removed redundant clk.h from mach-dove/common.c] Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-dove/common.c')
-rw-r--r--arch/arm/mach-dove/common.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index bda7aca04ca0..63fe6e612e98 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <linux/clk.h> 16#include <linux/clk-provider.h>
17#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <asm/page.h> 19#include <asm/page.h>
@@ -68,6 +68,17 @@ void __init dove_map_io(void)
68} 68}
69 69
70/***************************************************************************** 70/*****************************************************************************
71 * CLK tree
72 ****************************************************************************/
73static struct clk *tclk;
74
75static void __init clk_init(void)
76{
77 tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
78 get_tclk());
79}
80
81/*****************************************************************************
71 * EHCI0 82 * EHCI0
72 ****************************************************************************/ 83 ****************************************************************************/
73void __init dove_ehci0_init(void) 84void __init dove_ehci0_init(void)
@@ -272,18 +283,17 @@ void __init dove_sdio1_init(void)
272 283
273void __init dove_init(void) 284void __init dove_init(void)
274{ 285{
275 int tclk;
276
277 tclk = get_tclk();
278
279 printk(KERN_INFO "Dove 88AP510 SoC, "); 286 printk(KERN_INFO "Dove 88AP510 SoC, ");
280 printk(KERN_INFO "TCLK = %dMHz\n", (tclk + 499999) / 1000000); 287 printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
281 288
282#ifdef CONFIG_CACHE_TAUROS2 289#ifdef CONFIG_CACHE_TAUROS2
283 tauros2_init(); 290 tauros2_init();
284#endif 291#endif
285 dove_setup_cpu_mbus(); 292 dove_setup_cpu_mbus();
286 293
294 /* Setup root of clk tree */
295 clk_init();
296
287 /* internal devices that every board has */ 297 /* internal devices that every board has */
288 dove_rtc_init(); 298 dove_rtc_init();
289 dove_xor0_init(); 299 dove_xor0_init();