Skip to contentSkip to conversation

imx: mx6qsabreauto: drop duplicated net phy configuration

PATCH New Peng Fan 3 participants 4 messages May 24, 2016

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 imx: mx6qsabreauto: drop duplicated net phy configuration

In 'commit d584c68ce0f5bf2f430ccfb2ba00bd506206fb91', ar8031 is changed to use ar8035_config. ar8035_config actually does the same thing as mx6_rgmii_rework, so drop mx6_rgmii_rework and board_phy_config.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 33 ---------------------------
 1 file changed, 33 deletions(-)
board/freescale/mx6qsabreauto/mx6qsabreauto.c +0 -33
index 0712f08..d63a979 100644
@@ -321,39 +321,6 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
-int mx6_rgmii_rework(struct phy_device *phydev)
-{
-	unsigned short val;
-
-	/* To enable AR8031 ouput a 125MHz clk from CLK_25M */
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7);
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016);
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007);
-
-	val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
-	val &= 0xffe3;
-	val |= 0x18;
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
-
-	/* introduce tx clock delay */
-	phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x5);
-	val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
-	val |= 0x0100;
-	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, val);
-
-	return 0;
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
-	mx6_rgmii_rework(phydev);
-
-	if (phydev->drv->config)
-		phydev->drv->config(phydev);
-
-	return 0;
-}
-
 static void setup_fec(void)
 {
 	if (is_mx6dqp()) {
Signature · 1 line
2.6.2
#1 lore raw

PATCH 1/1 imx: mx6qsabreauto: drop duplicated net phy configuration

Quoted 1 line · Peng Fan

In 'commit d584c68ce0f5bf2f430ccfb2ba00bd506206fb91',

In the future, please use the following format when referencing commit IDs:
d584c68ce ("phy: atheros: Use ar8035_config for AR8031")

Quoted 7 lines

ar8031 is changed to use ar8035_config. ar8035_config actually does the same thing as mx6_rgmii_rework, so drop mx6_rgmii_rework and board_phy_config.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
author
#2 lore raw

PATCH 1/1 imx: mx6qsabreauto: drop duplicated net phy configuration

Hi Fabio,

Quoted 5 lines · Fabio Estevam
Quoted 1 line · Peng Fan

In 'commit d584c68ce0f5bf2f430ccfb2ba00bd506206fb91',

In the future, please use the following format when referencing commit IDs:
d584c68ce ("phy: atheros: Use ar8035_config for AR8031")

Thanks. Will follow this in future patches.

Thanks,
Peng.

Quoted 10 lines
Quoted 8 lines

ar8031 is changed to use ar8035_config. ar8035_config actually does the same thing as mx6_rgmii_rework, so drop mx6_rgmii_rework and board_phy_config.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
#3 lore raw

PATCH 1/1 imx: mx6qsabreauto: drop duplicated net phy configuration

In reply to Peng Fan
Quoted 47 lines · Peng Fan

In 'commit d584c68ce0f5bf2f430ccfb2ba00bd506206fb91', ar8031 is changed to use ar8035_config. ar8035_config actually does the same thing as mx6_rgmii_rework, so drop mx6_rgmii_rework and board_phy_config.

Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 33 ---------------------------
 1 file changed, 33 deletions(-)
board/freescale/mx6qsabreauto/mx6qsabreauto.c +0 -26
index 0712f08..d63a979 100644
@@ -321,39 +321,6 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
-int mx6_rgmii_rework(struct phy_device *phydev)
-{
-	unsigned short val;
-
-	/* To enable AR8031 ouput a 125MHz clk from CLK_25M */
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7);
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016);
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007);
-
-	val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
-	val &= 0xffe3;
-	val |= 0x18;
-	phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
-
-	/* introduce tx clock delay */
-	phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x5);
-	val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
-	val |= 0x0100;
-	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, val);
-
-	return 0;
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
-	mx6_rgmii_rework(phydev);

board/freescale/mx6qsabreauto/mx6qsabreauto.c static void setup_gpmi_nand(void) · line 326

Quoted 10 lines
board/freescale/mx6qsabreauto/mx6qsabreauto.c +0 -7
-
-	if (phydev->drv->config)
-		phydev->drv->config(phydev);
-
-	return 0;
-}
-
 static void setup_fec(void)
 {
 	if (is_mx6dqp()) {

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================