Commit c71dc808 authored by Sergei Poselenov's avatar Sergei Poselenov

RT #102588. Added support for 10/100 Mbit for SF2-DEV-KIT.

Signed-off-by: default avatarGreg Martin <gregm102@me.com>
Signed-off-by: default avatarSergei Poselenov <sposelenov@emcraft.com>
parent a697c919
......@@ -753,6 +753,11 @@ static int m2s_eth_init(struct eth_device *dev, bd_t *bd_unused)
M2S_SYSREG->mac_cr = (M2S_SYSREG->mac_cr & ~M2S_SYS_MAC_CR_LS_MSK) |
m2s_mii_speed;
M2S_MAC_CFG->cfg2 |= M2S_MAC_CFG2_FULL_DUP;
M2S_MAC_CFG->cfg2 &= ~(M2S_MAC_CFG2_MODE_MSK << M2S_MAC_CFG2_MODE_BIT);
if (m2s_mii_speed == M2S_SYS_MAC_CR_LS_1000)
M2S_MAC_CFG->cfg2 |= (M2S_MAC_CFG2_MODE_BYTE << M2S_MAC_CFG2_MODE_BIT);
else
M2S_MAC_CFG->cfg2 |= (M2S_MAC_CFG2_MODE_MII << M2S_MAC_CFG2_MODE_BIT);
/*
* Enable MAC Rx and Tx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment