Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -7,6 +7,8 @@ menuconfig MDIO_DEVICE
|
||||
help
|
||||
MDIO devices and driver infrastructure code.
|
||||
|
||||
if MDIO_DEVICE
|
||||
|
||||
config MDIO_BUS
|
||||
tristate
|
||||
default m if PHYLIB=m
|
||||
@@ -179,6 +181,7 @@ config MDIO_XGENE
|
||||
APM X-Gene SoC's.
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
config PHYLINK
|
||||
tristate
|
||||
|
@@ -323,6 +323,19 @@ static int bcm54xx_config_init(struct phy_device *phydev)
|
||||
|
||||
bcm54xx_phydsp_config(phydev);
|
||||
|
||||
/* Encode link speed into LED1 and LED3 pair (green/amber).
|
||||
* Also flash these two LEDs on activity. This means configuring
|
||||
* them for MULTICOLOR and encoding link/activity into them.
|
||||
*/
|
||||
val = BCM5482_SHD_LEDS1_LED1(BCM_LED_SRC_MULTICOLOR1) |
|
||||
BCM5482_SHD_LEDS1_LED3(BCM_LED_SRC_MULTICOLOR1);
|
||||
bcm_phy_write_shadow(phydev, BCM5482_SHD_LEDS1, val);
|
||||
|
||||
val = BCM_LED_MULTICOLOR_IN_PHASE |
|
||||
BCM5482_SHD_LEDS1_LED1(BCM_LED_MULTICOLOR_LINK_ACT) |
|
||||
BCM5482_SHD_LEDS1_LED3(BCM_LED_MULTICOLOR_LINK_ACT);
|
||||
bcm_phy_write_exp(phydev, BCM_EXP_MULTICOLOR, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
#define DP83822_PHY_ID 0x2000a240
|
||||
#define DP83825I_PHY_ID 0x2000a150
|
||||
|
||||
#define DP83822_DEVADDR 0x1f
|
||||
|
||||
#define MII_DP83822_PHYSCR 0x11
|
||||
@@ -304,26 +306,30 @@ static int dp83822_resume(struct phy_device *phydev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define DP83822_PHY_DRIVER(_id, _name) \
|
||||
{ \
|
||||
PHY_ID_MATCH_MODEL(_id), \
|
||||
.name = (_name), \
|
||||
.features = PHY_BASIC_FEATURES, \
|
||||
.soft_reset = dp83822_phy_reset, \
|
||||
.config_init = dp83822_config_init, \
|
||||
.get_wol = dp83822_get_wol, \
|
||||
.set_wol = dp83822_set_wol, \
|
||||
.ack_interrupt = dp83822_ack_interrupt, \
|
||||
.config_intr = dp83822_config_intr, \
|
||||
.suspend = dp83822_suspend, \
|
||||
.resume = dp83822_resume, \
|
||||
}
|
||||
|
||||
static struct phy_driver dp83822_driver[] = {
|
||||
{
|
||||
.phy_id = DP83822_PHY_ID,
|
||||
.phy_id_mask = 0xfffffff0,
|
||||
.name = "TI DP83822",
|
||||
.features = PHY_BASIC_FEATURES,
|
||||
.config_init = dp83822_config_init,
|
||||
.soft_reset = dp83822_phy_reset,
|
||||
.get_wol = dp83822_get_wol,
|
||||
.set_wol = dp83822_set_wol,
|
||||
.ack_interrupt = dp83822_ack_interrupt,
|
||||
.config_intr = dp83822_config_intr,
|
||||
.suspend = dp83822_suspend,
|
||||
.resume = dp83822_resume,
|
||||
},
|
||||
DP83822_PHY_DRIVER(DP83822_PHY_ID, "TI DP83822"),
|
||||
DP83822_PHY_DRIVER(DP83825I_PHY_ID, "TI DP83825I"),
|
||||
};
|
||||
module_phy_driver(dp83822_driver);
|
||||
|
||||
static struct mdio_device_id __maybe_unused dp83822_tbl[] = {
|
||||
{ DP83822_PHY_ID, 0xfffffff0 },
|
||||
{ DP83825I_PHY_ID, 0xfffffff0 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(mdio, dp83822_tbl);
|
||||
|
@@ -1831,7 +1831,7 @@ int genphy_soft_reset(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = phy_write(phydev, MII_BMCR, BMCR_RESET);
|
||||
ret = phy_set_bits(phydev, MII_BMCR, BMCR_RESET);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user