summaryrefslogtreecommitdiffstats
path: root/drivers/net/fm/eth.c
diff options
context:
space:
mode:
authorShengzhou Liu <Shengzhou.Liu@freescale.com>2013-11-22 17:39:09 +0800
committerYork Sun <yorksun@freescale.com>2013-11-25 11:43:47 -0800
commit82a55c1ef87bb6c596b19e83685cc4cbf0344cb3 (patch)
tree6502988e34279dd4788b11e2c5926d06a55b1d91 /drivers/net/fm/eth.c
parent0b66513b2706e941b55ffc6ad5aa011e10e87960 (diff)
downloadtalos-obmc-uboot-82a55c1ef87bb6c596b19e83685cc4cbf0344cb3.tar.gz
talos-obmc-uboot-82a55c1ef87bb6c596b19e83685cc4cbf0344cb3.zip
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.c12
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 = &reg->memac[num].fm_memac;
phyregs = &reg->memac[num].fm_memac_mdio;
#else
OpenPOWER on IntegriCloud