diff options
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h index 64d8f56a9c17..b3fe0575ff6b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | |||
@@ -172,6 +172,7 @@ enum inter_frame_gap { | |||
172 | /* GMAC FLOW CTRL defines */ | 172 | /* GMAC FLOW CTRL defines */ |
173 | #define GMAC_FLOW_CTRL_PT_MASK 0xffff0000 /* Pause Time Mask */ | 173 | #define GMAC_FLOW_CTRL_PT_MASK 0xffff0000 /* Pause Time Mask */ |
174 | #define GMAC_FLOW_CTRL_PT_SHIFT 16 | 174 | #define GMAC_FLOW_CTRL_PT_SHIFT 16 |
175 | #define GMAC_FLOW_CTRL_UP 0x00000008 /* Unicast pause frame enable */ | ||
175 | #define GMAC_FLOW_CTRL_RFE 0x00000004 /* Rx Flow Control Enable */ | 176 | #define GMAC_FLOW_CTRL_RFE 0x00000004 /* Rx Flow Control Enable */ |
176 | #define GMAC_FLOW_CTRL_TFE 0x00000002 /* Tx Flow Control Enable */ | 177 | #define GMAC_FLOW_CTRL_TFE 0x00000002 /* Tx Flow Control Enable */ |
177 | #define GMAC_FLOW_CTRL_FCB_BPA 0x00000001 /* Flow Control Busy ... */ | 178 | #define GMAC_FLOW_CTRL_FCB_BPA 0x00000001 /* Flow Control Busy ... */ |
@@ -246,6 +247,56 @@ enum ttc_control { | |||
246 | #define DMA_CONTROL_FEF 0x00000080 | 247 | #define DMA_CONTROL_FEF 0x00000080 |
247 | #define DMA_CONTROL_FUF 0x00000040 | 248 | #define DMA_CONTROL_FUF 0x00000040 |
248 | 249 | ||
250 | /* Receive flow control activation field | ||
251 | * RFA field in DMA control register, bits 23,10:9 | ||
252 | */ | ||
253 | #define DMA_CONTROL_RFA_MASK 0x00800600 | ||
254 | |||
255 | /* Receive flow control deactivation field | ||
256 | * RFD field in DMA control register, bits 22,12:11 | ||
257 | */ | ||
258 | #define DMA_CONTROL_RFD_MASK 0x00401800 | ||
259 | |||
260 | /* RFD and RFA fields are encoded as follows | ||
261 | * | ||
262 | * Bit Field | ||
263 | * 0,00 - Full minus 1KB (only valid when rxfifo >= 4KB and EFC enabled) | ||
264 | * 0,01 - Full minus 2KB (only valid when rxfifo >= 4KB and EFC enabled) | ||
265 | * 0,10 - Full minus 3KB (only valid when rxfifo >= 4KB and EFC enabled) | ||
266 | * 0,11 - Full minus 4KB (only valid when rxfifo > 4KB and EFC enabled) | ||
267 | * 1,00 - Full minus 5KB (only valid when rxfifo > 8KB and EFC enabled) | ||
268 | * 1,01 - Full minus 6KB (only valid when rxfifo > 8KB and EFC enabled) | ||
269 | * 1,10 - Full minus 7KB (only valid when rxfifo > 8KB and EFC enabled) | ||
270 | * 1,11 - Reserved | ||
271 | * | ||
272 | * RFD should always be > RFA for a given FIFO size. RFD == RFA may work, | ||
273 | * but packet throughput performance may not be as expected. | ||
274 | * | ||
275 | * Be sure that bit 3 in GMAC Register 6 is set for Unicast Pause frame | ||
276 | * detection (IEEE Specification Requirement, Annex 31B, 31B.1, Pause | ||
277 | * Description). | ||
278 | * | ||
279 | * Be sure that DZPA (bit 7 in Flow Control Register, GMAC Register 6), | ||
280 | * is set to 0. This allows pause frames with a quanta of 0 to be sent | ||
281 | * as an XOFF message to the link peer. | ||
282 | */ | ||
283 | |||
284 | #define RFA_FULL_MINUS_1K 0x00000000 | ||
285 | #define RFA_FULL_MINUS_2K 0x00000200 | ||
286 | #define RFA_FULL_MINUS_3K 0x00000400 | ||
287 | #define RFA_FULL_MINUS_4K 0x00000600 | ||
288 | #define RFA_FULL_MINUS_5K 0x00800000 | ||
289 | #define RFA_FULL_MINUS_6K 0x00800200 | ||
290 | #define RFA_FULL_MINUS_7K 0x00800400 | ||
291 | |||
292 | #define RFD_FULL_MINUS_1K 0x00000000 | ||
293 | #define RFD_FULL_MINUS_2K 0x00000800 | ||
294 | #define RFD_FULL_MINUS_3K 0x00001000 | ||
295 | #define RFD_FULL_MINUS_4K 0x00001800 | ||
296 | #define RFD_FULL_MINUS_5K 0x00400000 | ||
297 | #define RFD_FULL_MINUS_6K 0x00400800 | ||
298 | #define RFD_FULL_MINUS_7K 0x00401000 | ||
299 | |||
249 | enum rtc_control { | 300 | enum rtc_control { |
250 | DMA_CONTROL_RTC_64 = 0x00000000, | 301 | DMA_CONTROL_RTC_64 = 0x00000000, |
251 | DMA_CONTROL_RTC_32 = 0x00000008, | 302 | DMA_CONTROL_RTC_32 = 0x00000008, |