.. | .. |
---|
119 | 119 | ioaddr + DMA_CHAN_INTR_ENA(chan)); |
---|
120 | 120 | } |
---|
121 | 121 | |
---|
122 | | -static void dwmac410_dma_init_channel(void __iomem *ioaddr, |
---|
123 | | - struct stmmac_dma_cfg *dma_cfg, u32 chan) |
---|
124 | | -{ |
---|
125 | | - u32 value; |
---|
126 | | - |
---|
127 | | - /* common channel control register config */ |
---|
128 | | - value = readl(ioaddr + DMA_CHAN_CONTROL(chan)); |
---|
129 | | - if (dma_cfg->pblx8) |
---|
130 | | - value = value | DMA_BUS_MODE_PBL; |
---|
131 | | - |
---|
132 | | - writel(value, ioaddr + DMA_CHAN_CONTROL(chan)); |
---|
133 | | - |
---|
134 | | - /* Mask interrupts by writing to CSR7 */ |
---|
135 | | - writel(DMA_CHAN_INTR_DEFAULT_MASK_4_10, |
---|
136 | | - ioaddr + DMA_CHAN_INTR_ENA(chan)); |
---|
137 | | -} |
---|
138 | | - |
---|
139 | 122 | static void dwmac4_dma_init(void __iomem *ioaddr, |
---|
140 | 123 | struct stmmac_dma_cfg *dma_cfg, int atds) |
---|
141 | 124 | { |
---|
.. | .. |
---|
214 | 197 | u32 channel, int fifosz, u8 qmode) |
---|
215 | 198 | { |
---|
216 | 199 | unsigned int rqs = fifosz / 256 - 1; |
---|
217 | | - u32 mtl_rx_op; |
---|
| 200 | + u32 mtl_rx_op, mtl_rx_int; |
---|
218 | 201 | |
---|
219 | 202 | mtl_rx_op = readl(ioaddr + MTL_CHAN_RX_OP_MODE(channel)); |
---|
220 | 203 | |
---|
.. | .. |
---|
285 | 268 | } |
---|
286 | 269 | |
---|
287 | 270 | writel(mtl_rx_op, ioaddr + MTL_CHAN_RX_OP_MODE(channel)); |
---|
| 271 | + |
---|
| 272 | + /* Enable MTL RX overflow */ |
---|
| 273 | + mtl_rx_int = readl(ioaddr + MTL_CHAN_INT_CTRL(channel)); |
---|
| 274 | + writel(mtl_rx_int | MTL_RX_OVERFLOW_INT_EN, |
---|
| 275 | + ioaddr + MTL_CHAN_INT_CTRL(channel)); |
---|
288 | 276 | } |
---|
289 | 277 | |
---|
290 | 278 | static void dwmac4_dma_tx_chan_op_mode(void __iomem *ioaddr, int mode, |
---|
.. | .. |
---|
473 | 461 | const struct stmmac_dma_ops dwmac410_dma_ops = { |
---|
474 | 462 | .reset = dwmac4_dma_reset, |
---|
475 | 463 | .init = dwmac4_dma_init, |
---|
476 | | - .init_chan = dwmac410_dma_init_channel, |
---|
| 464 | + .init_chan = dwmac4_dma_init_channel, |
---|
477 | 465 | .init_rx_chan = dwmac4_dma_init_rx_chan, |
---|
478 | 466 | .init_tx_chan = dwmac4_dma_init_tx_chan, |
---|
479 | 467 | .axi = dwmac4_dma_axi, |
---|