Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266863
b: refs/heads/master
c: fddf86f
h: refs/heads/master
i:
  266861: 2d676cb
  266859: a6c0249
  266855: d2ddf4b
  266847: cb91438
v: v3
  • Loading branch information
Andy Fleming authored and David S. Miller committed Oct 19, 2011
1 parent 9d9bf61 commit bbecfcb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d153a7c8b23031df35e61377c0600a6c96a8b0b
refs/heads/master: fddf86fc4699a5fbabe6b8bda67613dbd57cbe47
34 changes: 22 additions & 12 deletions trunk/drivers/net/phy/vitesse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Author: Kriston Carson
*
* Copyright (c) 2005 Freescale Semiconductor, Inc.
* Copyright (c) 2005, 2009 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down Expand Up @@ -61,32 +61,42 @@ MODULE_DESCRIPTION("Vitesse PHY driver");
MODULE_AUTHOR("Kriston Carson");
MODULE_LICENSE("GPL");

static int vsc824x_config_init(struct phy_device *phydev)
int vsc824x_add_skew(struct phy_device *phydev)
{
int extcon;
int err;

err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
MII_VSC8244_AUXCONSTAT_INIT);
if (err < 0)
return err;
int extcon;

extcon = phy_read(phydev, MII_VSC8244_EXT_CON1);

if (extcon < 0)
return err;
return extcon;

extcon &= ~(MII_VSC8244_EXTCON1_TX_SKEW_MASK |
MII_VSC8244_EXTCON1_RX_SKEW_MASK);

if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
extcon |= (MII_VSC8244_EXTCON1_TX_SKEW |
MII_VSC8244_EXTCON1_RX_SKEW);
extcon |= (MII_VSC8244_EXTCON1_TX_SKEW |
MII_VSC8244_EXTCON1_RX_SKEW);

err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon);

return err;
}
EXPORT_SYMBOL(vsc824x_add_skew);

static int vsc824x_config_init(struct phy_device *phydev)
{
int err;

err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
MII_VSC8244_AUXCONSTAT_INIT);
if (err < 0)
return err;

if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
err = vsc824x_add_skew(phydev);

return err;
}

static int vsc824x_ack_interrupt(struct phy_device *phydev)
{
Expand Down

0 comments on commit bbecfcb

Please sign in to comment.