ssb: remove the ssb DMA API
PATCH 5/5 ssb: remove the ssb DMA API
From: FUJITA Tomonori <[email protected]>
Now they are unnecessary. We can use the generic DMA API with any bus.
Signed-off-by FUJITA Tomonori <[email protected]>
Cc Michael Buesch <[email protected]>
Cc Gary Zambrano <[email protected]>
Cc Stefano Brivio <[email protected]>
Cc Larry Finger <[email protected]>
Cc John W. Linville <[email protected]>
Cc David S. Miller <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/ssb/main.c | 74 ----------------- include/linux/ssb/ssb.h | 157 -------------------------------------- 2 files changed, 231 deletions(-)
drivers/ssb/main.c renamed from drivers/ssb/main.c~ssb-remove-the-ssb-dma-api +0 -74
@@ -1228,80 +1228,6 @@ u32 ssb_dma_translation(struct ssb_devic }EXPORT_SYMBOL (ssb_dma_translation); -int ssb_dma_set_mask (struct ssb_device *dev,u64 mask) -{ -#ifdef CONFIG_SSB_PCIHOST -int err; -#endif - -switch (dev->bus->bustype) { -case SSB_BUSTYPE_PCI : -#ifdef CONFIG_SSB_PCIHOST - err =pci_set_dma_mask (dev->bus->host_pci, mask); -if (err) -return err; - err =pci_set_consistent_dma_mask (dev->bus->host_pci, mask); -return err; -#endif -case SSB_BUSTYPE_SSB : -return dma_set_mask (dev->dev, mask); -default : -__ssb_dma_not_implemented (dev); - } -return -ENOSYS ; -} -EXPORT_SYMBOL (ssb_dma_set_mask); - -void *ssb_dma_alloc_consistent (struct ssb_device *dev,size_t size, -dma_addr_t *dma_handle,gfp_t gfp_flags) -{ -switch (dev->bus->bustype) { -case SSB_BUSTYPE_PCI : -#ifdef CONFIG_SSB_PCIHOST -if (gfp_flags &GFP_DMA ) { -/* Workaround: The PCI API does not support passing -* a GFP flag. */ -return dma_alloc_coherent (&dev->bus->host_pci->dev, - size, dma_handle, gfp_flags); - } -return pci_alloc_consistent (dev->bus->host_pci, size, dma_handle); -#endif -case SSB_BUSTYPE_SSB : -return dma_alloc_coherent (dev->dev, size, dma_handle, gfp_flags); -default : -__ssb_dma_not_implemented (dev); - } -return NULL ; -} -EXPORT_SYMBOL (ssb_dma_alloc_consistent); - -void ssb_dma_free_consistent (struct ssb_device *dev,size_t size, -void *vaddr,dma_addr_t dma_handle, -gfp_t gfp_flags) -{ -switch (dev->bus->bustype) { -case SSB_BUSTYPE_PCI : -#ifdef CONFIG_SSB_PCIHOST -if (gfp_flags &GFP_DMA ) { -/* Workaround: The PCI API does not support passing -* a GFP flag. */ -dma_free_coherent (&dev->bus->host_pci->dev, - size, vaddr, dma_handle); -return ; - } -pci_free_consistent (dev->bus->host_pci, size, - vaddr, dma_handle); -return ; -#endif -case SSB_BUSTYPE_SSB : -dma_free_coherent (dev->dev, size, vaddr, dma_handle); -return ; -default : -__ssb_dma_not_implemented (dev); - } -} -EXPORT_SYMBOL (ssb_dma_free_consistent); -int ssb_bus_may_powerdown (struct ssb_bus *bus) {struct ssb_chipcommon *cc;
include/linux/ssb/ssb.h renamed from include/linux/ssb/ssb.h~ssb-remove-the-ssb-dma-api +0 -157
169 lines not on this page · raw message
_