aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ioport.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-03-10 18:23:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:42 -0500
commit349004294c365cb99a0ee84149286d6f29b1e6b9 (patch)
tree0e131233812fd3f93827b0a5076ab532142ae0a7 /arch/sparc/kernel/ioport.c
parent06db881b4f1b5fb8fff563423f76b7361de8281a (diff)
dma-mapping: sparc: unify 32bit and 64bit dma_set_mask
This patchset transforms the PCI DMA API into the generic device model. It's one of the reasons why we introduced the generic DMA API long ago; driver writers are always able to use the generic DMA API with any bus instead of using bus specific DMA APIs such as pci_map_single, sbus_map_single, etc (only two bus specific APIs exist now; pci and ssb). Some of the PCI DMA API are already implented on the top of the generic DMA API (include/asm-generic/pci-dma-compat.h). But there are some exceptions. This patchset finishes the transformation. This patch: sparc has two dma_set_mask implementations for 32bit and 64bit. They are same except for the error returned value. We can safely unify them since the error returned value doesn't matter as long as it is negative (as DMA-API.txt describes). This patch also changes dma_set_mask not to call pci_set_dma_mask. Instead, dma_set_mask does the same thing that pci_set_dma_mask does. This change enables ut to change pci_set_dma_mask to call dma_set_mask; we can implement pci_set_dma_mask as pci-dma-compat.h does. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: David Miller <davem@davemloft.net> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: James Bottomley <James.Bottomley@suse.de> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Greg KH <greg@kroah.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r--arch/sparc/kernel/ioport.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 3c8c44f6a41c..84e5386714cd 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -676,17 +676,6 @@ int dma_supported(struct device *dev, u64 mask)
676} 676}
677EXPORT_SYMBOL(dma_supported); 677EXPORT_SYMBOL(dma_supported);
678 678
679int dma_set_mask(struct device *dev, u64 dma_mask)
680{
681#ifdef CONFIG_PCI
682 if (dev->bus == &pci_bus_type)
683 return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
684#endif
685 return -EOPNOTSUPP;
686}
687EXPORT_SYMBOL(dma_set_mask);
688
689
690#ifdef CONFIG_PROC_FS 679#ifdef CONFIG_PROC_FS
691 680
692static int sparc_io_proc_show(struct seq_file *m, void *v) 681static int sparc_io_proc_show(struct seq_file *m, void *v)