projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01c7274
)
net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case
author
Arınç ÜNAL
<arinc.unal@arinc9.com>
Mon, 20 Mar 2023 19:05:20 +0000
(22:05 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:47:49 +0000
(12:47 +0200)
[ Upstream commit
407b508bdd70b6848993843d96ed49ac4108fb52
]
Move setting the ssc_delta variable to under the PHY_INTERFACE_MODE_TRGMII
case as it's only needed when trgmii is used.
Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link:
https://lore.kernel.org/r/20230320190520.124513-3-arinc.unal@arinc9.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mt7530.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/mt7530.c
b/drivers/net/dsa/mt7530.c
index 314770515018ca325787aecb82a8c6916c967087..dfea2ab0c297f4791f1b24670ea6cfa4878bc0db 100644
(file)
--- a/
drivers/net/dsa/mt7530.c
+++ b/
drivers/net/dsa/mt7530.c
@@
-436,6
+436,10
@@
mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
break;
case PHY_INTERFACE_MODE_TRGMII:
trgint = 1;
+ if (xtal == HWTRAP_XTAL_25MHZ)
+ ssc_delta = 0x57;
+ else
+ ssc_delta = 0x87;
if (priv->id == ID_MT7621) {
/* PLL frequency: 150MHz: 1.2GBit */
if (xtal == HWTRAP_XTAL_40MHZ)
@@
-455,11
+459,6
@@
mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
return -EINVAL;
}
- if (xtal == HWTRAP_XTAL_25MHZ)
- ssc_delta = 0x57;
- else
- ssc_delta = 0x87;
-
mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
P6_INTF_MODE(trgint));