powerpc/dma: remove max_direct_dma_addr
The max_direct_dma_addr duplicates the bus_dma_mask field in struct device. Use the generic field instead. 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
391133fd5a
commit
74194cdaac
@@ -117,9 +117,8 @@ static u64 pci64_dma_offset;
|
||||
static void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev)
|
||||
{
|
||||
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
|
||||
struct dev_archdata *sd = &pdev->dev.archdata;
|
||||
|
||||
sd->max_direct_dma_addr =
|
||||
pdev->dev.bus_dma_mask =
|
||||
hose->dma_window_base_cur + hose->dma_window_size;
|
||||
}
|
||||
|
||||
@@ -144,6 +143,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
* mapping that allows addressing any RAM address from across PCI.
|
||||
*/
|
||||
if (dev_is_pci(dev) && dma_mask >= pci64_dma_offset * 2 - 1) {
|
||||
dev->bus_dma_mask = 0;
|
||||
set_dma_ops(dev, &dma_nommu_ops);
|
||||
set_dma_offset(dev, pci64_dma_offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user