mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
d1ac7230d0
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.50 All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800 Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod, ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me>
55 lines
1.5 KiB
Diff
55 lines
1.5 KiB
Diff
From f3cf1d06e2aef644b426c23b4bb570780b1f8d47 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Mon, 3 Apr 2023 02:18:04 +0100
|
|
Subject: [PATCH 05/13] net: dsa: mt7530: move SGMII PCS creation to
|
|
mt7530_probe function
|
|
|
|
Move creating the SGMII PCS from mt753x_setup() to the more appropriate
|
|
mt7530_probe() function.
|
|
This is done also in preparation of moving all functions related to
|
|
MDIO-connected MT753x switches to a separate module.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/dsa/mt7530.c | 13 +++++++------
|
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/net/dsa/mt7530.c
|
|
+++ b/drivers/net/dsa/mt7530.c
|
|
@@ -3049,12 +3049,6 @@ mt753x_setup(struct dsa_switch *ds)
|
|
if (ret && priv->irq)
|
|
mt7530_free_irq_common(priv);
|
|
|
|
- if (priv->id == ID_MT7531) {
|
|
- ret = mt7531_create_sgmii(priv);
|
|
- if (ret && priv->irq)
|
|
- mt7530_free_irq_common(priv);
|
|
- }
|
|
-
|
|
return ret;
|
|
}
|
|
|
|
@@ -3171,6 +3165,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
|
static struct regmap_config *regmap_config;
|
|
struct mt7530_priv *priv;
|
|
struct device_node *dn;
|
|
+ int ret;
|
|
|
|
dn = mdiodev->dev.of_node;
|
|
|
|
@@ -3263,6 +3258,12 @@ mt7530_probe(struct mdio_device *mdiodev
|
|
if (IS_ERR(priv->regmap))
|
|
return PTR_ERR(priv->regmap);
|
|
|
|
+ if (priv->id == ID_MT7531) {
|
|
+ ret = mt7531_create_sgmii(priv);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
return dsa_register_switch(priv->ds);
|
|
}
|
|
|