• Home
  • Raw
  • Download

Lines Matching refs:dma

59 	struct ltq_dma_channel dma;  member
103 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in xrx200_flush_dma()
110 ch->dma.desc++; in xrx200_flush_dma()
111 ch->dma.desc %= LTQ_DESC_NUM; in xrx200_flush_dma()
120 ltq_dma_open(&priv->chan_tx.dma); in xrx200_open()
121 ltq_dma_enable_irq(&priv->chan_tx.dma); in xrx200_open()
124 ltq_dma_open(&priv->chan_rx.dma); in xrx200_open()
133 ltq_dma_enable_irq(&priv->chan_rx.dma); in xrx200_open()
147 ltq_dma_close(&priv->chan_rx.dma); in xrx200_close()
150 ltq_dma_close(&priv->chan_tx.dma); in xrx200_close()
157 struct sk_buff *skb = ch->skb[ch->dma.desc]; in xrx200_alloc_skb()
161 ch->skb[ch->dma.desc] = netdev_alloc_skb_ip_align(ch->priv->net_dev, in xrx200_alloc_skb()
163 if (!ch->skb[ch->dma.desc]) { in xrx200_alloc_skb()
168 mapping = dma_map_single(ch->priv->dev, ch->skb[ch->dma.desc]->data, in xrx200_alloc_skb()
171 dev_kfree_skb_any(ch->skb[ch->dma.desc]); in xrx200_alloc_skb()
172 ch->skb[ch->dma.desc] = skb; in xrx200_alloc_skb()
177 ch->dma.desc_base[ch->dma.desc].addr = mapping; in xrx200_alloc_skb()
181 ch->dma.desc_base[ch->dma.desc].ctl = in xrx200_alloc_skb()
191 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in xrx200_hw_receive()
192 struct sk_buff *skb = ch->skb[ch->dma.desc]; in xrx200_hw_receive()
199 ch->dma.desc++; in xrx200_hw_receive()
200 ch->dma.desc %= LTQ_DESC_NUM; in xrx200_hw_receive()
225 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in xrx200_poll_rx()
239 ltq_dma_enable_irq(&ch->dma); in xrx200_poll_rx()
255 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->tx_free]; in xrx200_tx_housekeeping()
264 memset(&ch->dma.desc_base[ch->tx_free], 0, in xrx200_tx_housekeeping()
283 ltq_dma_enable_irq(&ch->dma); in xrx200_tx_housekeeping()
294 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; in xrx200_start_xmit()
307 if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) { in xrx200_start_xmit()
313 ch->skb[ch->dma.desc] = skb; in xrx200_start_xmit()
327 ch->dma.desc++; in xrx200_start_xmit()
328 ch->dma.desc %= LTQ_DESC_NUM; in xrx200_start_xmit()
329 if (ch->dma.desc == ch->tx_free) in xrx200_start_xmit()
356 ltq_dma_disable_irq(&ch->dma); in xrx200_dma_irq()
360 ltq_dma_ack_irq(&ch->dma); in xrx200_dma_irq()
374 ch_rx->dma.nr = XRX200_DMA_RX; in xrx200_dma_init()
375 ch_rx->dma.dev = priv->dev; in xrx200_dma_init()
378 ltq_dma_alloc_rx(&ch_rx->dma); in xrx200_dma_init()
379 for (ch_rx->dma.desc = 0; ch_rx->dma.desc < LTQ_DESC_NUM; in xrx200_dma_init()
380 ch_rx->dma.desc++) { in xrx200_dma_init()
385 ch_rx->dma.desc = 0; in xrx200_dma_init()
386 ret = devm_request_irq(priv->dev, ch_rx->dma.irq, xrx200_dma_irq, 0, in xrx200_dma_init()
390 ch_rx->dma.irq); in xrx200_dma_init()
394 ch_tx->dma.nr = XRX200_DMA_TX; in xrx200_dma_init()
395 ch_tx->dma.dev = priv->dev; in xrx200_dma_init()
398 ltq_dma_alloc_tx(&ch_tx->dma); in xrx200_dma_init()
399 ret = devm_request_irq(priv->dev, ch_tx->dma.irq, xrx200_dma_irq, 0, in xrx200_dma_init()
403 ch_tx->dma.irq); in xrx200_dma_init()
410 ltq_dma_free(&ch_tx->dma); in xrx200_dma_init()
420 ltq_dma_free(&ch_rx->dma); in xrx200_dma_init()
428 ltq_dma_free(&priv->chan_tx.dma); in xrx200_hw_cleanup()
429 ltq_dma_free(&priv->chan_rx.dma); in xrx200_hw_cleanup()
463 priv->chan_rx.dma.irq = platform_get_irq_byname(pdev, "rx"); in xrx200_probe()
464 if (priv->chan_rx.dma.irq < 0) in xrx200_probe()
466 priv->chan_tx.dma.irq = platform_get_irq_byname(pdev, "tx"); in xrx200_probe()
467 if (priv->chan_tx.dma.irq < 0) in xrx200_probe()