diff options
author | Shengzhou Liu <Shengzhou.Liu@freescale.com> | 2013-11-22 13:39:09 +0400 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-11-25 23:43:47 +0400 |
commit | 82a55c1ef87bb6c596b19e83685cc4cbf0344cb3 (patch) | |
tree | 6502988e34279dd4788b11e2c5926d06a55b1d91 /drivers/net/fm/eth.c | |
parent | 0b66513b2706e941b55ffc6ad5aa011e10e87960 (diff) | |
download | u-boot-82a55c1ef87bb6c596b19e83685cc4cbf0344cb3.tar.xz |
net/fman: Add support for 10GEC3 and 10GEC4
There are more than two 10GEC in single FMAN in some SoCs(e.g. T2080).
This patch adds support for 10GEC3 and 10GEC4.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Diffstat (limited to 'drivers/net/fm/eth.c')
-rw-r--r-- | drivers/net/fm/eth.c | 12 |
1 files changed, 10 insertions, 2 deletions
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 |