Skip to content
Snippets Groups Projects
Commit 15eb1069 authored by Joachim Foerster's avatar Joachim Foerster Committed by Wolfgang Denk
Browse files

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: default avatarJoachim Foerster <joachim.foerster@missinglinkelectronics.com>
parent b962ac79
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment