1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
diff -Nur linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c
--- linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c 2014-12-16 11:37:26.000000000 -0600
+++ linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c 2014-12-28 21:27:24.773847877 -0600
@@ -155,7 +155,7 @@
module_param_array(macaddr, byte, NULL, 0);
MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
-#if defined(CONFIG_M5272)
+#if defined(CONFIG_COLDFIRE)
/*
* Some hardware gets it MAC address out of local flash memory.
* if this is non-zero then assume it is the address to get MAC from.
@@ -173,7 +173,7 @@
#else
#define FEC_FLASHMAC 0
#endif
-#endif /* CONFIG_M5272 */
+#endif /* CONFIG_COLDFIRE */
/* Interrupt events/masks. */
#define FEC_ENET_HBERR ((uint)0x80000000) /* Heartbeat error */
@@ -889,7 +889,7 @@
/* Set MII speed */
writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
-#if !defined(CONFIG_M5272)
+#if !defined(CONFIG_COLDFIRE)
/* set RX checksum */
val = readl(fep->hwp + FEC_RACC);
if (fep->csum_flags & FLAG_RX_CSUM_ENABLED)
@@ -950,7 +950,7 @@
#endif
}
-#if !defined(CONFIG_M5272)
+#if !defined(CONFIG_COLDFIRE)
/* enable pause frame*/
if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
@@ -968,13 +968,13 @@
} else {
rcntl &= ~FEC_ENET_FCE;
}
-#endif /* !defined(CONFIG_M5272) */
+#endif /* !defined(CONFIG_COLDFIRE) */
writel(rcntl, fep->hwp + FEC_R_CNTRL);
/* Setup multicast filter. */
set_multicast_list(ndev);
-#ifndef CONFIG_M5272
+#ifndef CONFIG_COLDFIRE
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
#endif
@@ -989,7 +989,7 @@
if (fep->bufdesc_ex)
ecntl |= (1 << 4);
-#ifndef CONFIG_M5272
+#ifndef CONFIG_COLDFIRE
/* Enable the MIB statistic event counters */
writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
#endif
@@ -1436,7 +1436,7 @@
* 3) from flash or fuse (via platform data)
*/
if (!is_valid_ether_addr(iap)) {
-#ifdef CONFIG_M5272
+#ifdef CONFIG_COLDFIRE
if (FEC_FLASHMAC)
iap = (unsigned char *)FEC_FLASHMAC;
#else
@@ -1699,7 +1699,7 @@
if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
phy_dev->supported &= PHY_GBIT_FEATURES;
phy_dev->supported &= ~SUPPORTED_1000baseT_Half;
-#if !defined(CONFIG_M5272)
+#if !defined(CONFIG_COLDFIRE)
phy_dev->supported |= SUPPORTED_Pause;
#endif
}
@@ -1894,7 +1894,7 @@
}
}
-#if !defined(CONFIG_M5272)
+#if !defined(CONFIG_COLDFIRE)
static void fec_enet_get_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
@@ -2049,7 +2049,7 @@
return -EOPNOTSUPP;
}
}
-#endif /* !defined(CONFIG_M5272) */
+#endif /* !defined(CONFIG_COLDFIRE) */
static int fec_enet_nway_reset(struct net_device *dev)
{
@@ -2068,7 +2068,7 @@
.get_drvinfo = fec_enet_get_drvinfo,
.nway_reset = fec_enet_nway_reset,
.get_link = ethtool_op_get_link,
-#ifndef CONFIG_M5272
+#ifndef CONFIG_COLDFIRE
.get_pauseparam = fec_enet_get_pauseparam,
.set_pauseparam = fec_enet_set_pauseparam,
.get_strings = fec_enet_get_strings,
@@ -2571,7 +2571,7 @@
/* setup board info structure */
fep = netdev_priv(ndev);
-#if !defined(CONFIG_M5272)
+#if !defined(CONFIG_COLDFIRE)
/* default enable pause frame auto negotiation */
if (pdev->id_entry &&
(pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))
|