ssb: remove the ssb DMA API

Now they are unnecessary.  We can use the generic DMA API with any bus.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Gary Zambrano <zambrano@broadcom.com>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
FUJITA Tomonori
2010-06-03 19:37:44 -07:00
committed by John W. Linville
parent 39a6f4bce6
commit 467429b475
2 changed files with 0 additions and 231 deletions

View File

@@ -1228,80 +1228,6 @@ u32 ssb_dma_translation(struct ssb_device *dev)
}
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;