diff mbox

[U-Boot] imx: mx6qsabreauto: drop duplicated net phy configuration

Message ID 1464092927-3044-1-git-send-email-van.freenix@gmail.com
State Accepted
Commit 73f366bb5bec7c728dcfed51110818fa412dd878
Delegated to: Stefano Babic
Headers show

Commit Message

Peng Fan May 24, 2016, 12:28 p.m. UTC
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.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 33 ---------------------------
 1 file changed, 33 deletions(-)

Comments

Fabio Estevam May 24, 2016, 12:32 p.m. UTC | #1
On Tue, May 24, 2016 at 9:28 AM, Peng Fan <van.freenix@gmail.com> wrote:
> In 'commit d584c68ce0f5bf2f430ccfb2ba00bd506206fb91',

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

> 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.
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Stefano Babic May 24, 2016, 12:34 p.m. UTC | #2
On 24/05/2016 14:28, Peng Fan wrote:
> 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.
> 
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  board/freescale/mx6qsabreauto/mx6qsabreauto.c | 33 ---------------------------
>  1 file changed, 33 deletions(-)
> 
> diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> index 0712f08..d63a979 100644
> --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> @@ -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()) {
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Peng Fan May 24, 2016, 1:02 p.m. UTC | #3
Hi Fabio,

On Tue, May 24, 2016 at 09:32:31AM -0300, Fabio Estevam wrote:
>On Tue, May 24, 2016 at 9:28 AM, Peng Fan <van.freenix@gmail.com> wrote:
>> 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.

>
>> 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.
>>
>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>
>Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
diff mbox

Patch

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 0712f08..d63a979 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -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()) {