Lines Matching refs:dma_dev
135 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_tx_add() local
162 slot->dma_addr = dma_map_single(dma_dev, skb->data, skb_headlen(skb), in bgmac_dma_tx_add()
164 if (unlikely(dma_mapping_error(dma_dev, slot->dma_addr))) in bgmac_dma_tx_add()
180 slot->dma_addr = skb_frag_dma_map(dma_dev, frag, 0, in bgmac_dma_tx_add()
182 if (unlikely(dma_mapping_error(dma_dev, slot->dma_addr))) in bgmac_dma_tx_add()
211 dma_unmap_single(dma_dev, slot->dma_addr, skb_headlen(skb), in bgmac_dma_tx_add()
220 dma_unmap_page(dma_dev, slot->dma_addr, len, DMA_TO_DEVICE); in bgmac_dma_tx_add()
237 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_tx_free() local
262 dma_unmap_single(dma_dev, slot->dma_addr, len, in bgmac_dma_tx_free()
265 dma_unmap_page(dma_dev, slot->dma_addr, len, in bgmac_dma_tx_free()
336 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_rx_skb_for_slot() local
352 dma_addr = dma_map_single(dma_dev, buf + BGMAC_RX_BUF_OFFSET, in bgmac_dma_rx_skb_for_slot()
354 if (dma_mapping_error(dma_dev, dma_addr)) { in bgmac_dma_rx_skb_for_slot()
399 static void bgmac_dma_rx_poison_buf(struct device *dma_dev, in bgmac_dma_rx_poison_buf() argument
404 dma_sync_single_for_cpu(dma_dev, slot->dma_addr, BGMAC_RX_BUF_SIZE, in bgmac_dma_rx_poison_buf()
408 dma_sync_single_for_device(dma_dev, slot->dma_addr, BGMAC_RX_BUF_SIZE, in bgmac_dma_rx_poison_buf()
425 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_rx_read() local
436 bgmac_dma_rx_poison_buf(dma_dev, slot); in bgmac_dma_rx_read()
441 dma_unmap_single(dma_dev, dma_addr, in bgmac_dma_rx_read()
528 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_tx_ring_free() local
544 dma_unmap_single(dma_dev, slot->dma_addr, in bgmac_dma_tx_ring_free()
547 dma_unmap_page(dma_dev, slot->dma_addr, in bgmac_dma_tx_ring_free()
555 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_rx_ring_free() local
564 dma_unmap_single(dma_dev, slot->dma_addr, in bgmac_dma_rx_ring_free()
576 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_ring_desc_free() local
584 dma_free_coherent(dma_dev, size, ring->cpu_base, in bgmac_dma_ring_desc_free()
614 struct device *dma_dev = bgmac->dma_dev; in bgmac_dma_alloc() local
637 ring->cpu_base = dma_alloc_coherent(dma_dev, size, in bgmac_dma_alloc()
662 ring->cpu_base = dma_alloc_coherent(dma_dev, size, in bgmac_dma_alloc()