diff options
author | Amit Singh Tomar <amittomer25@gmail.com> | 2020-05-09 17:25:09 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-07 23:09:22 +0300 |
commit | 3a217346051ac8876d63becd12b6ddb7a72e82f9 (patch) | |
tree | 9ccdc5a37e725bc0baf48e50597e452133d0e7ff /drivers/clk/owl | |
parent | 0a7ba7c53c19d24f8de76082ba567a1eb2a04f96 (diff) | |
download | u-boot-3a217346051ac8876d63becd12b6ddb7a72e82f9.tar.xz |
clk: actions: Add Ethernet clocks
This commit adds clocks needed for ethernet operations for
Actions OWL family of SoCs (S700 and S900).
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
Diffstat (limited to 'drivers/clk/owl')
-rw-r--r-- | drivers/clk/owl/clk_owl.c | 9 | ||||
-rw-r--r-- | drivers/clk/owl/clk_owl.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c index 9715fce162..1999c87a33 100644 --- a/drivers/clk/owl/clk_owl.c +++ b/drivers/clk/owl/clk_owl.c @@ -87,6 +87,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; } @@ -112,6 +117,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; } diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h index cf896bdb98..a01f81a6a7 100644 --- a/drivers/clk/owl/clk_owl.h +++ b/drivers/clk/owl/clk_owl.h @@ -62,6 +62,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 |