dma-mapping, powerpc: simplify the arch dma_set_mask override
Instead of letting the architecture supply all of dma_set_mask just give it an additional hook selected by Kconfig. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
9b18114c0b
commit
11ddce1545
@@ -133,11 +133,8 @@ static void setup_swiotlb_ops(struct pci_controller *hose)
|
||||
static inline void setup_swiotlb_ops(struct pci_controller *hose) {}
|
||||
#endif
|
||||
|
||||
static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
static void fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
{
|
||||
if (!dev->dma_mask || !dma_supported(dev, dma_mask))
|
||||
return -EIO;
|
||||
|
||||
/*
|
||||
* Fix up PCI devices that are able to DMA to the large inbound
|
||||
* mapping that allows addressing any RAM address from across PCI.
|
||||
@@ -147,9 +144,6 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
set_dma_ops(dev, &dma_nommu_ops);
|
||||
set_dma_offset(dev, pci64_dma_offset);
|
||||
}
|
||||
|
||||
*dev->dma_mask = dma_mask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setup_one_atmu(struct ccsr_pci __iomem *pci,
|
||||
|
Reference in New Issue
Block a user