diff mbox series

[v4,07/12] phy: atheros: use defines for PHY IDs

Message ID 20200506221159.1298-8-michael@walle.cc
State Accepted
Commit 30e3193128f95d7276311b50f4215f9a8625c3ba
Headers show
Series phy: atheros: dt bindings and cleanup | expand

Commit Message

Michael Walle May 6, 2020, 10:11 p.m. UTC
Signed-off-by: Michael Walle <michael at walle.cc>
Acked-by: Joe Hershberger <joe.hershberger at ni.com>
---
 drivers/net/phy/atheros.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Tom Rini May 7, 2020, 6:53 p.m. UTC | #1
On Thu, May 07, 2020 at 12:11:54AM +0200, Michael Walle wrote:

> Signed-off-by: Michael Walle <michael at walle.cc>
> Acked-by: Joe Hershberger <joe.hershberger at ni.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 01953a1390..5ff5875d3d 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -26,6 +26,10 @@ 
 #define AR8035_CLK_25M_FREQ_125M	(BIT(4) | BIT(3))
 #define AR8035_CLK_25M_MASK		GENMASK(4, 3)
 
+#define AR8021_PHY_ID 0x004dd040
+#define AR8031_PHY_ID 0x004dd074
+#define AR8035_PHY_ID 0x004dd072
+
 static void ar803x_enable_rx_delay(struct phy_device *phydev, bool on)
 {
 	int regval;
@@ -119,7 +123,7 @@  static int ar8035_config(struct phy_device *phydev)
 
 static struct phy_driver AR8021_driver =  {
 	.name = "AR8021",
-	.uid = 0x4dd040,
+	.uid = AR8021_PHY_ID,
 	.mask = 0xfffffff0,
 	.features = PHY_GBIT_FEATURES,
 	.config = ar8021_config,
@@ -129,7 +133,7 @@  static struct phy_driver AR8021_driver =  {
 
 static struct phy_driver AR8031_driver =  {
 	.name = "AR8031/AR8033",
-	.uid = 0x4dd074,
+	.uid = AR8031_PHY_ID,
 	.mask = 0xffffffef,
 	.features = PHY_GBIT_FEATURES,
 	.config = ar8031_config,
@@ -139,7 +143,7 @@  static struct phy_driver AR8031_driver =  {
 
 static struct phy_driver AR8035_driver =  {
 	.name = "AR8035",
-	.uid = 0x4dd072,
+	.uid = AR8035_PHY_ID,
 	.mask = 0xffffffef,
 	.features = PHY_GBIT_FEATURES,
 	.config = ar8035_config,