summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2012-12-01 20:51:28 -0700
committerEric Nelson <eric.nelson@boundarydevices.com>2012-12-13 11:11:22 -0700
commit23f8463da111a5d0f151cb233d5259d280e44a53 (patch)
tree80e13b5e20caacefacd45b9b67fcf8befd9d033a
parent38d622938f1352a6550a5e38c624b46b6929439f (diff)
fec: enable tx/rx of pause frames for mx6q
I don't know what ticket TKT116501 is but I don't see a problem with pause frame enabled on rev 1.0 silicon. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
-rw-r--r--drivers/net/fec.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index c92bca0eef1f..ff967e578e91 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1035,9 +1035,10 @@ static int fec_enet_mii_probe(struct net_device *ndev)
}
/* mask with MAC supported features */
- if (cpu_is_mx6q() || cpu_is_mx6dl())
- phy_dev->supported &= PHY_GBIT_FEATURES;
- else
+ if (cpu_is_mx6q() || cpu_is_mx6dl()) {
+ /* SUPPORTED_Asym_Pause prevents my switch from linking up */
+ phy_dev->supported &= PHY_GBIT_FEATURES | SUPPORTED_Pause;
+ } else
phy_dev->supported &= PHY_BASIC_FEATURES;
phy_dev->advertising = phy_dev->supported;
@@ -1641,12 +1642,9 @@ fec_restart(struct net_device *dev, int duplex)
* ENET pause frame has two issues as ticket TKT116501
* The issues have been fixed on Rigel TO1.1 and Arik TO1.2
*/
- if ((cpu_is_mx6q() &&
- (mx6q_revision() >= IMX_CHIP_REVISION_1_2)) ||
- (cpu_is_mx6dl() &&
- (mx6dl_revision() >= IMX_CHIP_REVISION_1_1)))
+ if (cpu_is_mx6q() || (cpu_is_mx6dl()
+ && (mx6dl_revision() >= IMX_CHIP_REVISION_1_1)))
val |= FEC_ENET_FCE;
-
writel(val, fep->hwp + FEC_R_CNTRL);
}
@@ -1700,24 +1698,24 @@ fec_restart(struct net_device *dev, int duplex)
fep->phy_dev->speed == SPEED_1000)
val |= (0x1 << 5);
- /* RX FIFO threshold setting for ENET pause frame feature
- * Only set the parameters after ticket TKT116501 fixed.
- * The issue has been fixed on Rigel TO1.1 and Arik TO1.2
- */
- if ((cpu_is_mx6q() &&
- (mx6q_revision() >= IMX_CHIP_REVISION_1_2)) ||
- (cpu_is_mx6dl() &&
- (mx6dl_revision() >= IMX_CHIP_REVISION_1_1))) {
- writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
+ if (cpu_is_mx6q() || cpu_is_mx6dl()) {
+ u32 rsem_val = 0;
+ /* RX FIFO threshold setting for ENET pause frame feature
+ * Only set the parameters after ticket TKT116501 fixed.
+ * The issue has been fixed on Rigel TO1.1 and Arik TO1.2
+ */
+ if (cpu_is_mx6q() || (cpu_is_mx6dl()
+ && (mx6dl_revision() >= IMX_CHIP_REVISION_1_1)))
+ rsem_val = FEC_ENET_RSEM_V;
+
+ writel(rsem_val, fep->hwp + FEC_R_FIFO_RSEM);
writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL);
writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM);
writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL);
/* OPD */
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
- }
- if (cpu_is_mx6q() || cpu_is_mx6dl()) {
/* enable endian swap */
val |= (0x1 << 8);
/* enable ENET store and forward mode */