diff mbox

[uboot,v5,7/7] net: phy: dp83867: Add SGMII helper for configuration

Message ID 1460377108-19262-7-git-send-email-dmurphy@ti.com
State Superseded
Headers show

Commit Message

Dan Murphy April 11, 2016, 12:18 p.m. UTC
The code assumed that if the interface is not RGMII configured
then it must be SGMII configured.  This device has the ability
to support most of the MII interfaces.  Therefore add the
helper for SGMII and only configure the device if the interface is
configured for SGMII.

Signed-off-by: Dan Murphy <dmurphy@ti.com>

---

v5 - No change

 drivers/net/phy/ti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.8.0.rc3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Dan Murphy April 13, 2016, 1:38 p.m. UTC | #1
Adding Joe

On 04/11/2016 07:18 AM, Dan Murphy wrote:
> The code assumed that if the interface is not RGMII configured

> then it must be SGMII configured.  This device has the ability

> to support most of the MII interfaces.  Therefore add the

> helper for SGMII and only configure the device if the interface is

> configured for SGMII.

>

> Signed-off-by: Dan Murphy <dmurphy@ti.com>

> ---

>

> v5 - No change

>

>  drivers/net/phy/ti.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c

> index b1f1ec8..f881914 100644

> --- a/drivers/net/phy/ti.c

> +++ b/drivers/net/phy/ti.c

> @@ -219,7 +219,7 @@ static int dp83867_config(struct phy_device *phydev)

>  			(dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));

>  		if (ret)

>  			goto err_out;

> -	} else {

> +	} else if (phy_interface_is_sgmii(phydev)) {

>  		phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR,

>  			  (BMCR_ANENABLE | BMCR_FULLDPLX | BMCR_SPEED1000));

>  



-- 
------------------
Dan Murphy

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index b1f1ec8..f881914 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -219,7 +219,7 @@  static int dp83867_config(struct phy_device *phydev)
 			(dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
 		if (ret)
 			goto err_out;
-	} else {
+	} else if (phy_interface_is_sgmii(phydev)) {
 		phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR,
 			  (BMCR_ANENABLE | BMCR_FULLDPLX | BMCR_SPEED1000));