aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-02-18 16:26:42 -0500
committerMike Turquette <mturquette@linaro.org>2012-05-08 19:33:58 -0400
commiteee989902aab45f0ca2739727ef615420802649c (patch)
tree062debde96c0ffb0d13c151e81f9d41561cd20d0 /arch/arm/mach-kirkwood/common.c
parent74c335761acdfd94736d28ba0b941a2efb9c81f0 (diff)
ARM: Orion: SATA: Add per channel clk/clkdev support.
The Orion kirkwood chips have a gatable clock per SATA channel. Add code to get and enable this clk if it exists. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r--arch/arm/mach-kirkwood/common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 46d7b4374908..c9fef5b7c56e 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -86,7 +86,7 @@ static struct clk __init *kirkwood_register_gate(const char *name, u8 bit_idx)
86 86
87void __init kirkwood_clk_init(void) 87void __init kirkwood_clk_init(void)
88{ 88{
89 struct clk *runit, *ge0, *ge1; 89 struct clk *runit, *ge0, *ge1, *sata0, *sata1, *usb0;
90 90
91 tclk = clk_register_fixed_rate(NULL, "tclk", NULL, 91 tclk = clk_register_fixed_rate(NULL, "tclk", NULL,
92 CLK_IS_ROOT, kirkwood_tclk); 92 CLK_IS_ROOT, kirkwood_tclk);
@@ -94,8 +94,8 @@ void __init kirkwood_clk_init(void)
94 runit = kirkwood_register_gate("runit", CGC_BIT_RUNIT); 94 runit = kirkwood_register_gate("runit", CGC_BIT_RUNIT);
95 ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0); 95 ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0);
96 ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1); 96 ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1);
97 kirkwood_register_gate("sata0", CGC_BIT_SATA0); 97 sata0 = kirkwood_register_gate("sata0", CGC_BIT_SATA0);
98 kirkwood_register_gate("sata1", CGC_BIT_SATA1); 98 sata1 = kirkwood_register_gate("sata1", CGC_BIT_SATA1);
99 kirkwood_register_gate("usb0", CGC_BIT_USB0); 99 kirkwood_register_gate("usb0", CGC_BIT_USB0);
100 kirkwood_register_gate("sdio", CGC_BIT_SDIO); 100 kirkwood_register_gate("sdio", CGC_BIT_SDIO);
101 kirkwood_register_gate("crypto", CGC_BIT_CRYPTO); 101 kirkwood_register_gate("crypto", CGC_BIT_CRYPTO);
@@ -113,6 +113,8 @@ void __init kirkwood_clk_init(void)
113 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".0", ge0); 113 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".0", ge0);
114 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".1", ge1); 114 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".1", ge1);
115 orion_clkdev_add(NULL, "orion_wdt", tclk); 115 orion_clkdev_add(NULL, "orion_wdt", tclk);
116 orion_clkdev_add("0", "sata_mv.0", sata0);
117 orion_clkdev_add("1", "sata_mv.0", sata1);
116} 118}
117 119
118/***************************************************************************** 120/*****************************************************************************