diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/common.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/common.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 0319d640f728..bcd54d6e94fd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h | |||
@@ -97,6 +97,16 @@ struct stmmac_extra_stats { | |||
97 | unsigned long normal_irq_n; | 97 | unsigned long normal_irq_n; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* CSR Frequency Access Defines*/ | ||
101 | #define CSR_F_35M 35000000 | ||
102 | #define CSR_F_60M 60000000 | ||
103 | #define CSR_F_100M 100000000 | ||
104 | #define CSR_F_150M 150000000 | ||
105 | #define CSR_F_250M 250000000 | ||
106 | #define CSR_F_300M 300000000 | ||
107 | |||
108 | #define MAC_CSR_H_FRQ_MASK 0x20 | ||
109 | |||
100 | #define HASH_TABLE_SIZE 64 | 110 | #define HASH_TABLE_SIZE 64 |
101 | #define PAUSE_TIME 0x200 | 111 | #define PAUSE_TIME 0x200 |
102 | 112 | ||
@@ -137,6 +147,7 @@ struct stmmac_extra_stats { | |||
137 | #define DMA_HW_FEAT_FLEXIPPSEN 0x04000000 /* Flexible PPS Output */ | 147 | #define DMA_HW_FEAT_FLEXIPPSEN 0x04000000 /* Flexible PPS Output */ |
138 | #define DMA_HW_FEAT_SAVLANINS 0x08000000 /* Source Addr or VLAN Insertion */ | 148 | #define DMA_HW_FEAT_SAVLANINS 0x08000000 /* Source Addr or VLAN Insertion */ |
139 | #define DMA_HW_FEAT_ACTPHYIF 0x70000000 /* Active/selected PHY interface */ | 149 | #define DMA_HW_FEAT_ACTPHYIF 0x70000000 /* Active/selected PHY interface */ |
150 | #define DEFAULT_DMA_PBL 8 | ||
140 | 151 | ||
141 | enum rx_frame_status { /* IPC status */ | 152 | enum rx_frame_status { /* IPC status */ |
142 | good_frame = 0, | 153 | good_frame = 0, |
@@ -228,7 +239,7 @@ struct stmmac_desc_ops { | |||
228 | int (*get_rx_owner) (struct dma_desc *p); | 239 | int (*get_rx_owner) (struct dma_desc *p); |
229 | void (*set_rx_owner) (struct dma_desc *p); | 240 | void (*set_rx_owner) (struct dma_desc *p); |
230 | /* Get the receive frame size */ | 241 | /* Get the receive frame size */ |
231 | int (*get_rx_frame_len) (struct dma_desc *p); | 242 | int (*get_rx_frame_len) (struct dma_desc *p, int rx_coe_type); |
232 | /* Return the reception status looking at the RDES1 */ | 243 | /* Return the reception status looking at the RDES1 */ |
233 | int (*rx_status) (void *data, struct stmmac_extra_stats *x, | 244 | int (*rx_status) (void *data, struct stmmac_extra_stats *x, |
234 | struct dma_desc *p); | 245 | struct dma_desc *p); |
@@ -236,7 +247,8 @@ struct stmmac_desc_ops { | |||
236 | 247 | ||
237 | struct stmmac_dma_ops { | 248 | struct stmmac_dma_ops { |
238 | /* DMA core initialization */ | 249 | /* DMA core initialization */ |
239 | int (*init) (void __iomem *ioaddr, int pbl, u32 dma_tx, u32 dma_rx); | 250 | int (*init) (void __iomem *ioaddr, int pbl, int fb, int mb, |
251 | int burst_len, u32 dma_tx, u32 dma_rx); | ||
240 | /* Dump DMA registers */ | 252 | /* Dump DMA registers */ |
241 | void (*dump_regs) (void __iomem *ioaddr); | 253 | void (*dump_regs) (void __iomem *ioaddr); |
242 | /* Set tx/rx threshold in the csr6 register | 254 | /* Set tx/rx threshold in the csr6 register |
@@ -261,14 +273,14 @@ struct stmmac_dma_ops { | |||
261 | struct stmmac_ops { | 273 | struct stmmac_ops { |
262 | /* MAC core initialization */ | 274 | /* MAC core initialization */ |
263 | void (*core_init) (void __iomem *ioaddr) ____cacheline_aligned; | 275 | void (*core_init) (void __iomem *ioaddr) ____cacheline_aligned; |
264 | /* Support checksum offload engine */ | 276 | /* Enable and verify that the IPC module is supported */ |
265 | int (*rx_coe) (void __iomem *ioaddr); | 277 | int (*rx_ipc) (void __iomem *ioaddr); |
266 | /* Dump MAC registers */ | 278 | /* Dump MAC registers */ |
267 | void (*dump_regs) (void __iomem *ioaddr); | 279 | void (*dump_regs) (void __iomem *ioaddr); |
268 | /* Handle extra events on specific interrupts hw dependent */ | 280 | /* Handle extra events on specific interrupts hw dependent */ |
269 | void (*host_irq_status) (void __iomem *ioaddr); | 281 | void (*host_irq_status) (void __iomem *ioaddr); |
270 | /* Multicast filter setting */ | 282 | /* Multicast filter setting */ |
271 | void (*set_filter) (struct net_device *dev); | 283 | void (*set_filter) (struct net_device *dev, int id); |
272 | /* Flow control setting */ | 284 | /* Flow control setting */ |
273 | void (*flow_ctrl) (void __iomem *ioaddr, unsigned int duplex, | 285 | void (*flow_ctrl) (void __iomem *ioaddr, unsigned int duplex, |
274 | unsigned int fc, unsigned int pause_time); | 286 | unsigned int fc, unsigned int pause_time); |