summaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq/xway/reset.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-01-19 09:54:25 +0100
committerJohn Crispin <blogic@openwrt.org>2013-02-17 00:15:17 +0100
commitd0c550dc36881fda171ec8ad3dcc67491ad968eb (patch)
tree2d086dea11edbdd0eb1bc5c1819147445cd6f126 /arch/mips/lantiq/xway/reset.c
parentMIPS: lantiq: adds static clock for PP32 (diff)
downloadlinux-d0c550dc36881fda171ec8ad3dcc67491ad968eb.tar.xz
linux-d0c550dc36881fda171ec8ad3dcc67491ad968eb.zip
MIPS: lantiq: add GPHY clock gate bits
Explicitly enable the clock gate of the internal GPHYs found on xrx200. Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/4816/
Diffstat (limited to 'arch/mips/lantiq/xway/reset.c')
-rw-r--r--arch/mips/lantiq/xway/reset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c
index 544dbb7fb421..1fa0f175357e 100644
--- a/arch/mips/lantiq/xway/reset.c
+++ b/arch/mips/lantiq/xway/reset.c
@@ -78,10 +78,19 @@ static struct ltq_xrx200_gphy_reset {
/* reset and boot a gphy. these phys only exist on xrx200 SoC */
int xrx200_gphy_boot(struct device *dev, unsigned int id, dma_addr_t dev_addr)
{
+ struct clk *clk;
+
if (!of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200")) {
dev_err(dev, "this SoC has no GPHY\n");
return -EINVAL;
}
+
+ clk = clk_get_sys("1f203000.rcu", "gphy");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+
+ clk_enable(clk);
+
if (id > 1) {
dev_err(dev, "%u is an invalid gphy id\n", id);
return -EINVAL;