1 /* dma.c: PCI and SBUS DMA accessors for 32-bit sparc.
3 * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
6 #include <linux/kernel.h>
7 #include <linux/module.h>
8 #include <linux/dma-mapping.h>
9 #include <linux/scatterlist.h>
13 #include <linux/pci.h>
17 * Return whether the given PCI device DMA address mask can be
18 * supported properly. For example, if your device can only drive the
19 * low 24-bits during PCI bus mastering, then you would pass
20 * 0x00ffffff as the mask to this function.
22 int dma_supported(struct device *dev, u64 mask)
25 if (dev->bus == &pci_bus_type)
30 EXPORT_SYMBOL(dma_supported);
32 int dma_set_mask(struct device *dev, u64 dma_mask)
35 if (dev->bus == &pci_bus_type)
36 return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
40 EXPORT_SYMBOL(dma_set_mask);