summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2012-12-13 11:10:55 -0700
committerEric Nelson <eric.nelson@boundarydevices.com>2013-02-12 10:46:55 -0700
commita3b7d8e8ab2cfbfdddad414809617ad4a0639555 (patch)
tree1b00503045b21a944438631093094c8c2f713a57 /drivers/net
parent253d398c00df00d4d13d5f0bf5140729472a94be (diff)
fec: tune RSEM and RSFL values for tapeout 1.0
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 780614710b59..dd28d2cb21b5 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -159,7 +159,9 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
/* Pause frame feild and FIFO threshold */
#define FEC_ENET_FCE (1 << 5)
#define FEC_ENET_RSEM_V 0x84
+#define FEC_ENET_RSEM_V_TO1 0x10
#define FEC_ENET_RSFL_V 16
+#define FEC_ENET_RSFL_V_TO1 0x20
#define FEC_ENET_RAEM_V 0x8
#define FEC_ENET_RAFL_V 0x8
#define FEC_ENET_OPD_V 0xFFF0
@@ -1721,11 +1723,18 @@ fec_restart(struct net_device *dev, int duplex)
* 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;
+ && (mx6dl_revision() >= IMX_CHIP_REVISION_1_1))) {
+ if (cpu_is_mx6q() && (mx6q_revision() < IMX_CHIP_REVISION_1_1)) {
+ rsem_val = FEC_ENET_RSEM_V_TO1;
+ } else
+ 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);
+ if (cpu_is_mx6q() && (mx6q_revision() < IMX_CHIP_REVISION_1_1))
+ writel(FEC_ENET_RSFL_V_TO1, fep->hwp + FEC_R_FIFO_RSFL);
+ else
+ 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);