.. | .. |
---|
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 | + |
---|
122 | 139 | static void dwmac4_dma_init(void __iomem *ioaddr, |
---|
123 | 140 | struct stmmac_dma_cfg *dma_cfg, int atds) |
---|
124 | 141 | { |
---|
.. | .. |
---|
197 | 214 | u32 channel, int fifosz, u8 qmode) |
---|
198 | 215 | { |
---|
199 | 216 | unsigned int rqs = fifosz / 256 - 1; |
---|
200 | | - u32 mtl_rx_op, mtl_rx_int; |
---|
| 217 | + u32 mtl_rx_op; |
---|
201 | 218 | |
---|
202 | 219 | mtl_rx_op = readl(ioaddr + MTL_CHAN_RX_OP_MODE(channel)); |
---|
203 | 220 | |
---|
.. | .. |
---|
268 | 285 | } |
---|
269 | 286 | |
---|
270 | 287 | 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)); |
---|
276 | 288 | } |
---|
277 | 289 | |
---|
278 | 290 | static void dwmac4_dma_tx_chan_op_mode(void __iomem *ioaddr, int mode, |
---|
.. | .. |
---|
461 | 473 | const struct stmmac_dma_ops dwmac410_dma_ops = { |
---|
462 | 474 | .reset = dwmac4_dma_reset, |
---|
463 | 475 | .init = dwmac4_dma_init, |
---|
464 | | - .init_chan = dwmac4_dma_init_channel, |
---|
| 476 | + .init_chan = dwmac410_dma_init_channel, |
---|
465 | 477 | .init_rx_chan = dwmac4_dma_init_rx_chan, |
---|
466 | 478 | .init_tx_chan = dwmac4_dma_init_tx_chan, |
---|
467 | 479 | .axi = dwmac4_dma_axi, |
---|