aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-02-18 22:26:42 +0100
committerMike Turquette <mturquette@linaro.org>2012-05-08 16:33:58 -0700
commiteee989902aab45f0ca2739727ef615420802649c (patch)
tree062debde96c0ffb0d13c151e81f9d41561cd20d0 /arch/arm/mach-kirkwood/common.c
parent74c335761acdfd94736d28ba0b941a2efb9c81f0 (diff)
downloadkernel_goldelico_gta04-eee989902aab45f0ca2739727ef615420802649c.zip
kernel_goldelico_gta04-eee989902aab45f0ca2739727ef615420802649c.tar.gz
kernel_goldelico_gta04-eee989902aab45f0ca2739727ef615420802649c.tar.bz2
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 46d7b43..c9fef5b 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)
void __init kirkwood_clk_init(void)
{
- struct clk *runit, *ge0, *ge1;
+ struct clk *runit, *ge0, *ge1, *sata0, *sata1, *usb0;
tclk = clk_register_fixed_rate(NULL, "tclk", NULL,
CLK_IS_ROOT, kirkwood_tclk);
@@ -94,8 +94,8 @@ void __init kirkwood_clk_init(void)
runit = kirkwood_register_gate("runit", CGC_BIT_RUNIT);
ge0 = kirkwood_register_gate("ge0", CGC_BIT_GE0);
ge1 = kirkwood_register_gate("ge1", CGC_BIT_GE1);
- kirkwood_register_gate("sata0", CGC_BIT_SATA0);
- kirkwood_register_gate("sata1", CGC_BIT_SATA1);
+ sata0 = kirkwood_register_gate("sata0", CGC_BIT_SATA0);
+ sata1 = kirkwood_register_gate("sata1", CGC_BIT_SATA1);
kirkwood_register_gate("usb0", CGC_BIT_USB0);
kirkwood_register_gate("sdio", CGC_BIT_SDIO);
kirkwood_register_gate("crypto", CGC_BIT_CRYPTO);
@@ -113,6 +113,8 @@ void __init kirkwood_clk_init(void)
orion_clkdev_add(NULL, MV643XX_ETH_NAME ".0", ge0);
orion_clkdev_add(NULL, MV643XX_ETH_NAME ".1", ge1);
orion_clkdev_add(NULL, "orion_wdt", tclk);
+ orion_clkdev_add("0", "sata_mv.0", sata0);
+ orion_clkdev_add("1", "sata_mv.0", sata1);
}
/*****************************************************************************