1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
Amit Singh Tomar
2020-05-09 19:55:09 +05:30
committed by Tom Rini
parent 0a7ba7c53c
commit 3a21734605
4 changed files with 15 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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