aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
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-orion5x
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-orion5x')
-rw-r--r--arch/arm/mach-orion5x/common.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 24481666d2cd..81660522c6b4 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -18,6 +18,7 @@
18#include <linux/mv643xx_i2c.h> 18#include <linux/mv643xx_i2c.h>
19#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/clk-provider.h>
21#include <net/dsa.h> 22#include <net/dsa.h>
22#include <asm/page.h> 23#include <asm/page.h>
23#include <asm/setup.h> 24#include <asm/setup.h>
@@ -70,6 +71,17 @@ void __init orion5x_map_io(void)
70 71
71 72
72/***************************************************************************** 73/*****************************************************************************
74 * CLK tree
75 ****************************************************************************/
76static struct clk *tclk;
77
78static void __init clk_init(void)
79{
80 tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
81 orion5x_tclk);
82}
83
84/*****************************************************************************
73 * EHCI0 85 * EHCI0
74 ****************************************************************************/ 86 ****************************************************************************/
75void __init orion5x_ehci0_init(void) 87void __init orion5x_ehci0_init(void)
@@ -276,6 +288,9 @@ void __init orion5x_init(void)
276 */ 288 */
277 orion5x_setup_cpu_mbus_bridge(); 289 orion5x_setup_cpu_mbus_bridge();
278 290
291 /* Setup root of clk tree */
292 clk_init();
293
279 /* 294 /*
280 * Don't issue "Wait for Interrupt" instruction if we are 295 * Don't issue "Wait for Interrupt" instruction if we are
281 * running on D0 5281 silicon. 296 * running on D0 5281 silicon.