diff options
| author | Joachim Foerster <joachim.foerster@missinglinkelectronics.com> | 2011-10-25 22:39:57 +0000 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2011-10-26 21:28:18 +0200 | 
| commit | 15eb1069663676243a63a916fe482e751cd56deb (patch) | |
| tree | 62aecfc402d4c701c24ceeb36eaf215038f9a8b6 /drivers/net/altera_tse.c | |
| parent | b962ac794a26ff80269755c13c3e4fee65c3809e (diff) | |
| download | olio-uboot-2014.01-15eb1069663676243a63a916fe482e751cd56deb.tar.xz olio-uboot-2014.01-15eb1069663676243a63a916fe482e751cd56deb.zip | |
altera_tse: m88e1111s: Honor device flags regarding PHY interface mode
Note: This is kind of guess work. The current code is preserved for
all RGMII related modes. It is different for flags=0 (GMII) and flags=5
(SGMII). The last case, SGMII, is successfully tested on
Altera's Terasic DE4.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
Diffstat (limited to 'drivers/net/altera_tse.c')
| -rw-r--r-- | drivers/net/altera_tse.c | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index afd8e3126..8b18ad0b0 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -583,7 +583,11 @@ static uint mii_m88e1111s_setmode_sr(uint mii_reg, struct altera_tse_priv *priv)  {  	uint mii_data = tse_mdio_read(priv, mii_reg);  	mii_data &= 0xfff0; -	mii_data |= 0xb; +	if ((priv->flags >= 1) && (priv->flags <= 4)) +		mii_data |= 0xb; +	else if (priv->flags == 5) +		mii_data |= 0x4; +  	return mii_data;  } @@ -591,7 +595,9 @@ static uint mii_m88e1111s_setmode_cr(uint mii_reg, struct altera_tse_priv *priv)  {  	uint mii_data = tse_mdio_read(priv, mii_reg);  	mii_data &= ~0x82; -	mii_data |= 0x82; +	if ((priv->flags >= 1) && (priv->flags <= 4)) +		mii_data |= 0x82; +  	return mii_data;  } |