提交 337ac9d5 编写于 作者: C Cyril Chemparathy 提交者: David S. Miller

phy/marvell: rename 88ec048 to 88e1318s and fix mscr1 addr

The marvell 88ec048's official part number is 88e1318s.  This patch renames
definitions in the driver to reflect this.

In addition, a minor bug fix has been added to write back the MSCR1 register
value properly.
Signed-off-by: NCyril Chemparathy <cyril@ti.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a4765fa7
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
#define MII_88E1121_PHY_MSCR_TX_DELAY BIT(4) #define MII_88E1121_PHY_MSCR_TX_DELAY BIT(4)
#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(0x3 << 4)) #define MII_88E1121_PHY_MSCR_DELAY_MASK (~(0x3 << 4))
#define MII_88EC048_PHY_MSCR1_REG 16 #define MII_88E1318S_PHY_MSCR1_REG 16
#define MII_88EC048_PHY_MSCR1_PAD_ODD BIT(6) #define MII_88E1318S_PHY_MSCR1_PAD_ODD BIT(6)
#define MII_88E1121_PHY_LED_CTRL 16 #define MII_88E1121_PHY_LED_CTRL 16
#define MII_88E1121_PHY_LED_PAGE 3 #define MII_88E1121_PHY_LED_PAGE 3
...@@ -240,7 +240,7 @@ static int m88e1121_config_aneg(struct phy_device *phydev) ...@@ -240,7 +240,7 @@ static int m88e1121_config_aneg(struct phy_device *phydev)
return err; return err;
} }
static int m88ec048_config_aneg(struct phy_device *phydev) static int m88e1318_config_aneg(struct phy_device *phydev)
{ {
int err, oldpage, mscr; int err, oldpage, mscr;
...@@ -251,10 +251,10 @@ static int m88ec048_config_aneg(struct phy_device *phydev) ...@@ -251,10 +251,10 @@ static int m88ec048_config_aneg(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
mscr = phy_read(phydev, MII_88EC048_PHY_MSCR1_REG); mscr = phy_read(phydev, MII_88E1318S_PHY_MSCR1_REG);
mscr |= MII_88EC048_PHY_MSCR1_PAD_ODD; mscr |= MII_88E1318S_PHY_MSCR1_PAD_ODD;
err = phy_write(phydev, MII_88E1121_PHY_MSCR_REG, mscr); err = phy_write(phydev, MII_88E1318S_PHY_MSCR1_REG, mscr);
if (err < 0) if (err < 0)
return err; return err;
...@@ -659,12 +659,12 @@ static struct phy_driver marvell_drivers[] = { ...@@ -659,12 +659,12 @@ static struct phy_driver marvell_drivers[] = {
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88EC048, .phy_id = MARVELL_PHY_ID_88E1318S,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88EC048", .name = "Marvell 88E1318S",
.features = PHY_GBIT_FEATURES, .features = PHY_GBIT_FEATURES,
.flags = PHY_HAS_INTERRUPT, .flags = PHY_HAS_INTERRUPT,
.config_aneg = &m88ec048_config_aneg, .config_aneg = &m88e1318_config_aneg,
.read_status = &marvell_read_status, .read_status = &marvell_read_status,
.ack_interrupt = &marvell_ack_interrupt, .ack_interrupt = &marvell_ack_interrupt,
.config_intr = &marvell_config_intr, .config_intr = &marvell_config_intr,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#define MARVELL_PHY_ID_88E1121R 0x01410cb0 #define MARVELL_PHY_ID_88E1121R 0x01410cb0
#define MARVELL_PHY_ID_88E1145 0x01410cd0 #define MARVELL_PHY_ID_88E1145 0x01410cd0
#define MARVELL_PHY_ID_88E1240 0x01410e30 #define MARVELL_PHY_ID_88E1240 0x01410e30
#define MARVELL_PHY_ID_88EC048 0x01410e90 #define MARVELL_PHY_ID_88E1318S 0x01410e90
/* struct phy_device dev_flags definitions */ /* struct phy_device dev_flags definitions */
#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册