diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-09-16 23:21:53 +0400 |
---|---|---|
committer | Kim Phillips <kim.phillips@freescale.com> | 2009-09-25 18:25:41 -0500 |
commit | 6185f80c311cc3bdef2f8d5096c61e40ca6f48b2 (patch) | |
tree | a08ef4381801a0f270dfebd23bc64e86965d1fac /drivers | |
parent | 984f10baac8ef6032df52f135943d6b0bc96f724 (diff) | |
download | u-boot-imx-6185f80c311cc3bdef2f8d5096c61e40ca6f48b2.zip u-boot-imx-6185f80c311cc3bdef2f8d5096c61e40ca6f48b2.tar.gz u-boot-imx-6185f80c311cc3bdef2f8d5096c61e40ca6f48b2.tar.bz2 |
net: uec_phy: Implement TXID and RXID RGMII modes for Marvell PHYs
This will be needed for MPC8360E-MDS boards with rev. 2.1 CPUs.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/qe/uec.h | 1 | ||||
-rw-r--r-- | drivers/qe/uec_phy.c | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/qe/uec.h b/drivers/qe/uec.h index 1568310..df6f7c9 100644 --- a/drivers/qe/uec.h +++ b/drivers/qe/uec.h @@ -670,6 +670,7 @@ typedef enum enet_interface { ENET_1000_RGMII, ENET_1000_RGMII_ID, ENET_1000_RGMII_RXID, + ENET_1000_RGMII_TXID, ENET_1000_TBI, ENET_1000_RTBI, ENET_1000_SGMII diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index aa4eb5e..9715183 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); |