diff options
author | Wolfgang Denk <wd@denx.de> | 2009-09-30 23:22:46 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-09-30 23:22:46 +0200 |
commit | 37d416324b657f38822f88314f2c7f7804405f02 (patch) | |
tree | 72edd5ebf42e63806d3c5ffd21ba7bffa0e67d49 /drivers/qe/uec_phy.c | |
parent | d3909d74ccde4ce465006ead669d0d7b54177fb2 (diff) | |
parent | c7190f028fa950d4d36b6d0b4bb3fc72602ec54c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
Diffstat (limited to 'drivers/qe/uec_phy.c')
-rw-r--r-- | drivers/qe/uec_phy.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index aa4eb5e389..9715183942 100644 --- a/drivers/qe/uec_phy.c +++ b/drivers/qe/uec_phy.c @@ -429,12 +429,23 @@ static int marvell_init(struct uec_mii_info *mii_info) { struct eth_device *edev = mii_info->dev; uec_private_t *uec = edev->priv; + enum enet_interface iface = uec->uec_info->enet_interface; - if (uec->uec_info->enet_interface == ENET_1000_RGMII_ID) { + if (iface == ENET_1000_RGMII_ID || + iface == ENET_1000_RGMII_RXID || + iface == ENET_1000_RGMII_TXID) { int temp; temp = phy_read(mii_info, MII_M1111_PHY_EXT_CR); - temp |= (MII_M1111_RX_DELAY | MII_M1111_TX_DELAY); + if (iface == ENET_1000_RGMII_ID) { + temp |= MII_M1111_RX_DELAY | MII_M1111_TX_DELAY; + } else if (iface == ENET_1000_RGMII_RXID) { + temp &= ~MII_M1111_TX_DELAY; + temp |= MII_M1111_RX_DELAY; + } else if (iface == ENET_1000_RGMII_TXID) { + temp &= ~MII_M1111_RX_DELAY; + temp |= MII_M1111_TX_DELAY; + } phy_write(mii_info, MII_M1111_PHY_EXT_CR, temp); temp = phy_read(mii_info, MII_M1111_PHY_EXT_SR); |