OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 6... Line 6...
6 Signed-off-by: Felix Fietkau <nbd@nbd.name> 6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 --- 7 ---
Line 8... Line 8...
8   8  
9 --- a/drivers/net/phy/at803x.c 9 --- a/drivers/net/phy/at803x.c
10 +++ b/drivers/net/phy/at803x.c 10 +++ b/drivers/net/phy/at803x.c
Line 11... Line 11...
11 @@ -62,8 +62,10 @@ 11 @@ -62,6 +62,7 @@
12 12
13 #define ATH8030_PHY_ID 0x004dd076 13 #define ATH8030_PHY_ID 0x004dd076
14 #define ATH8031_PHY_ID 0x004dd074 14 #define ATH8031_PHY_ID 0x004dd074
15 +#define ATH8032_PHY_ID 0x004dd023 15 +#define ATH8032_PHY_ID 0x004dd023
16 #define ATH8035_PHY_ID 0x004dd072 -  
Line 17... Line -...
17 #define AT803X_PHY_ID_MASK 0xffffffef -  
18 +#define AT8032_PHY_ID_MASK 0xffffffff -  
19 16 #define ATH8035_PHY_ID 0x004dd072
20 MODULE_DESCRIPTION("Atheros 803x PHY driver"); 17 #define AT803X_PHY_ID_MASK 0xffffffef
21 MODULE_AUTHOR("Matus Ujhelyi"); 18
Line 22... Line 19...
22 @@ -256,7 +258,8 @@ static int at803x_probe(struct phy_devic 19 @@ -256,7 +257,8 @@ static int at803x_probe(struct phy_devic
23 if (!priv) 20 if (!priv)
24 return -ENOMEM; 21 return -ENOMEM;
25 22
Line 26... Line 23...
26 - if (phydev->drv->phy_id != ATH8030_PHY_ID) 23 - if (phydev->drv->phy_id != ATH8030_PHY_ID)
27 + if (phydev->drv->phy_id != ATH8030_PHY_ID && 24 + if (phydev->drv->phy_id != ATH8030_PHY_ID &&
28 + phydev->drv->phy_id != ATH8032_PHY_ID) 25 + phydev->drv->phy_id != ATH8032_PHY_ID)
Line 29... Line 26...
29 goto does_not_require_reset_workaround; 26 goto does_not_require_reset_workaround;
30 27
31 gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); 28 gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
32 @@ -332,7 +335,7 @@ static void at803x_link_change_notify(st 29 @@ -332,7 +334,7 @@ static void at803x_link_change_notify(st
33 struct at803x_priv *priv = phydev->priv; 30 struct at803x_priv *priv = phydev->priv;
34 31
35 /* 32 /*
36 - * Conduct a hardware reset for AT8030 every time a link loss is 33 - * Conduct a hardware reset for AT8030 every time a link loss is
37 + * Conduct a hardware reset for AT8030/2 every time a link loss is 34 + * Conduct a hardware reset for AT8030/2 every time a link loss is
38 * signalled. This is necessary to circumvent a hardware bug that 35 * signalled. This is necessary to circumvent a hardware bug that
39 * occurs when the cable is unplugged while TX packets are pending 36 * occurs when the cable is unplugged while TX packets are pending
40 * in the FIFO. In such cases, the FIFO enters an error mode it 37 * in the FIFO. In such cases, the FIFO enters an error mode it
41 @@ -444,6 +447,24 @@ static struct phy_driver at803x_driver[] 38 @@ -444,6 +446,24 @@ static struct phy_driver at803x_driver[]
42 .aneg_done = at803x_aneg_done, 39 .aneg_done = at803x_aneg_done,
43 .ack_interrupt = &at803x_ack_interrupt, 40 .ack_interrupt = &at803x_ack_interrupt,
44 .config_intr = &at803x_config_intr, 41 .config_intr = &at803x_config_intr,
45 +}, { 42 +}, {
46 + /* ATHEROS 8032 */ 43 + /* ATHEROS 8032 */
47 + .phy_id = ATH8032_PHY_ID, 44 + .phy_id = ATH8032_PHY_ID,
48 + .name = "Atheros 8032 ethernet", 45 + .name = "Atheros 8032 ethernet",
Line 61... Line 58...
61 + .ack_interrupt = at803x_ack_interrupt, 58 + .ack_interrupt = at803x_ack_interrupt,
62 + .config_intr = at803x_config_intr, 59 + .config_intr = at803x_config_intr,
63 } }; 60 } };
Line 64... Line 61...
64 61
65 module_phy_driver(at803x_driver); 62 module_phy_driver(at803x_driver);
66 @@ -451,6 +472,7 @@ module_phy_driver(at803x_driver); 63 @@ -451,6 +471,7 @@ module_phy_driver(at803x_driver);
67 static struct mdio_device_id __maybe_unused atheros_tbl[] = { 64 static struct mdio_device_id __maybe_unused atheros_tbl[] = {
68 { ATH8030_PHY_ID, AT803X_PHY_ID_MASK }, 65 { ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
69 { ATH8031_PHY_ID, AT803X_PHY_ID_MASK }, 66 { ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
70 + { ATH8032_PHY_ID, AT8032_PHY_ID_MASK }, 67 + { ATH8032_PHY_ID, AT803X_PHY_ID_MASK },
71 { ATH8035_PHY_ID, AT803X_PHY_ID_MASK }, 68 { ATH8035_PHY_ID, AT803X_PHY_ID_MASK },
72 { } 69 { }