+MODULE_LICENSE("GPL");
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
-@@ -1989,6 +1989,47 @@ static const struct irq_domain_ops mt753
+@@ -2001,6 +2001,47 @@ static const struct irq_domain_ops mt753
};
static void
mt7530_setup_mdio_irq(struct mt7530_priv *priv)
{
struct dsa_switch *ds = priv->ds;
-@@ -2022,8 +2063,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2034,8 +2075,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
return priv->irq ? : -EINVAL;
}
if (!priv->irq_domain) {
dev_err(dev, "failed to create IRQ domain\n");
return -ENOMEM;
-@@ -2520,6 +2568,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2534,6 +2582,25 @@ static void mt7531_mac_port_get_caps(str
}
}
static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{
-@@ -2596,6 +2663,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2610,6 +2677,17 @@ static bool mt753x_is_mac_port(u32 port)
}
static int
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface)
{
-@@ -2665,7 +2743,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2679,7 +2757,8 @@ mt753x_phylink_mac_config(struct dsa_swi
switch (port) {
case 0 ... 4: /* Internal phy */
goto unsupported;
break;
case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2743,7 +2822,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2757,7 +2836,8 @@ static void mt753x_phylink_mac_link_up(s
/* MT753x MAC works in 1G full duplex mode for all up-clocked
* variants.
*/
(phy_interface_mode_is_8023z(interface))) {
speed = SPEED_1000;
duplex = DUPLEX_FULL;
-@@ -2823,6 +2903,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -2837,6 +2917,21 @@ mt7531_cpu_port_config(struct dsa_switch
return 0;
}
static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
struct phylink_config *config)
{
-@@ -2968,6 +3063,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -2982,6 +3077,27 @@ static int mt753x_set_mac_eee(struct dsa
return 0;
}
const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
-@@ -3036,6 +3152,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3050,6 +3166,17 @@ const struct mt753x_info mt753x_table[]
.mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_config = mt7531_mac_config,
},
MT7531_MIRROR_MASK : MIRROR_MASK)
/* Registers for BPDU and PAE frame control*/
-@@ -295,9 +296,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -300,9 +301,8 @@ enum mt7530_vlan_port_acc_frm {
MT7531_FORCE_DPX | \
MT7531_FORCE_RX_FC | \
MT7531_FORCE_TX_FC)