diff options
author | Kristoffer Glembo <kristoffer@gaisler.com> | 2011-01-17 23:10:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:18:57 -0400 |
commit | b8682cefb861c61ced6ca2300a5ef96e91c6dbff (patch) | |
tree | c7d5d90a535326d0b70be42943161d2e418719ec /arch/sparc/kernel/ioport.c | |
parent | 5c8345bbe8e7cfd5bfa59f0e1fcef2e12a28e430 (diff) |
sparc: Add pci32_unmap_page.
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index cea49c0756d2..1b9f07c07640 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -524,6 +524,13 @@ static dma_addr_t pci32_map_page(struct device *dev, struct page *page, | |||
524 | return page_to_phys(page) + offset; | 524 | return page_to_phys(page) + offset; |
525 | } | 525 | } |
526 | 526 | ||
527 | static void pci32_unmap_page(struct device *dev, dma_addr_t ba, size_t size, | ||
528 | enum dma_data_direction dir, struct dma_attrs *attrs) | ||
529 | { | ||
530 | if (dir != PCI_DMA_TODEVICE) | ||
531 | mmu_inval_dma_area((unsigned long)phys_to_virt(ba), PAGE_ALIGN(size)); | ||
532 | } | ||
533 | |||
527 | /* Map a set of buffers described by scatterlist in streaming | 534 | /* Map a set of buffers described by scatterlist in streaming |
528 | * mode for DMA. This is the scather-gather version of the | 535 | * mode for DMA. This is the scather-gather version of the |
529 | * above pci_map_single interface. Here the scatter gather list | 536 | * above pci_map_single interface. Here the scatter gather list |
@@ -646,6 +653,7 @@ struct dma_map_ops pci32_dma_ops = { | |||
646 | .alloc_coherent = pci32_alloc_coherent, | 653 | .alloc_coherent = pci32_alloc_coherent, |
647 | .free_coherent = pci32_free_coherent, | 654 | .free_coherent = pci32_free_coherent, |
648 | .map_page = pci32_map_page, | 655 | .map_page = pci32_map_page, |
656 | .unmap_page = pci32_unmap_page, | ||
649 | .map_sg = pci32_map_sg, | 657 | .map_sg = pci32_map_sg, |
650 | .unmap_sg = pci32_unmap_sg, | 658 | .unmap_sg = pci32_unmap_sg, |
651 | .sync_single_for_cpu = pci32_sync_single_for_cpu, | 659 | .sync_single_for_cpu = pci32_sync_single_for_cpu, |