X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Ffm%2Feth.c;h=218a5ed17509a6d2d50eb83cbebabd55fe110a53;hb=64f41212d880f3d00c6994d973aadeec5bda1b65;hp=cb099cd84962fa7ba09da632683c1fd8622466ff;hpb=6d4511b2c6734842de9de21c1bc0db4c3ea28b72;p=u-boot diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index cb099cd849..218a5ed175 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -557,8 +557,16 @@ static int fm_eth_init_mac(struct fm_eth *fm_eth, struct ccsr_fman *reg) num = fm_eth->num; #ifdef CONFIG_SYS_FMAN_V3 - if (fm_eth->type == FM_ETH_10G_E) - num += 8; + if (fm_eth->type == FM_ETH_10G_E) { + /* 10GEC1/10GEC2 use mEMAC9/mEMAC10 + * 10GEC3/10GEC4 use mEMAC1/mEMAC2 + * so it needs to change the num. + */ + if (fm_eth->num >= 2) + num -= 2; + else + num += 8; + } base = ®->memac[num].fm_memac; phyregs = ®->memac[num].fm_memac_mdio; #else