@@ -53,4 +53,6 @@
#define CMU_CVBSPLL 0x00B8
#define CMU_SSTSCLK 0x00C0
+#define CMU_DEVCLKEN1_ETH BIT(23)
+
#endif
@@ -61,4 +61,8 @@
#define CMU_TVOUTPLLDEBUG0 (0x00EC)
#define CMU_TVOUTPLLDEBUG1 (0x00FC)
+#define CMU_DEVCLKEN1_ETH BIT(22)
+#define CLK_ETHERNET CLK_ETH_MAC
+#define CMU_ETHERNETPLL CMU_ASSISTPLL
+
#endif
@@ -85,6 +85,11 @@ int owl_clk_enable(struct clk *clk)
/* Enable UART3 interface clock */
setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3);
break;
+ case CLK_RMII_REF:
+ case CLK_ETHERNET:
+ setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_ETH);
+ setbits_le32(priv->base + CMU_ETHERNETPLL, 5);
+ break;
default:
return -EINVAL;
}
@@ -110,6 +115,10 @@ int owl_clk_disable(struct clk *clk)
/* Disable UART3 interface clock */
clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3);
break;
+ case CLK_RMII_REF:
+ case CLK_ETHERNET:
+ clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_ETH);
+ break;
default:
return -EINVAL;
}
@@ -59,6 +59,4 @@ struct owl_clk_priv {
#define CMU_DEVCLKEN1_UART5 BIT(21)
#define CMU_DEVCLKEN1_UART3 BIT(11)
-#define CMU_DEVCLKEN1_ETH_S700 BIT(23)
-
#endif
This commit adds clocks needed for ethernet operations for Actions OWL family of SoCs (S700 and S900). Signed-off-by: Amit Singh Tomar <amittomer25 at gmail.com> --- arch/arm/include/asm/arch-owl/regs_s700.h | 2 ++ arch/arm/include/asm/arch-owl/regs_s900.h | 4 ++++ drivers/clk/owl/clk_owl.c | 9 +++++++++ drivers/clk/owl/clk_owl.h | 2 -- 4 files changed, 15 insertions(+), 2 deletions(-)